diff options
author | Marek Polacek <polacek@redhat.com> | 2014-06-09 20:33:51 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2014-06-09 20:33:51 +0000 |
commit | d7ff7ae55410b6566f2e65843f69dc41e8c9c87e (patch) | |
tree | 92fa4e29eb5d8ccef0c7ca0f2d1bbf5232779d5c /gcc/testsuite/gcc.dg/c99-flex-array-7.c | |
parent | 23646391f243274745cf31e66d914061570a4c45 (diff) | |
download | gcc-d7ff7ae55410b6566f2e65843f69dc41e8c9c87e.zip gcc-d7ff7ae55410b6566f2e65843f69dc41e8c9c87e.tar.gz gcc-d7ff7ae55410b6566f2e65843f69dc41e8c9c87e.tar.bz2 |
re PR c/36446 (unexplained warning in struct initialization)
PR c/36446
* c-typeck.c (error_init): Call inform instead of error_at.
(pedwarn_init): Call inform instead of pedwarn.
(warning_init): Call inform instead of warning_at.
* gcc.dg/Wcxx-compat-6.c: Change dg-warning to dg-message.
* gcc.dg/array-2.c: Likewise.
* gcc.dg/array-const-2.c: Likewise.
* gcc.dg/ucnid-8.c: Likewise.
* gcc.dg/vla-init-1.c: Likewise.
* gcc.dg/array-const-3.c: Change dg-error to dg-message.
* gcc.dg/c99-flex-array-7.c: Likewise.
* gcc.dg/init-bad-1.c: Likewise.
* gcc.dg/init-bad-3.c: Likewise.
* gcc.dg/init-bad-2.c: Change dg-error and dg-warning to dg-message.
* gcc.dg/pedwarn-init.c: Add dg-warning.
* gcc.dg/pr53119.c: Remove dg-excess-errors.
From-SVN: r211388
Diffstat (limited to 'gcc/testsuite/gcc.dg/c99-flex-array-7.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/c99-flex-array-7.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/testsuite/gcc.dg/c99-flex-array-7.c b/gcc/testsuite/gcc.dg/c99-flex-array-7.c index 8966e6c..88018b0 100644 --- a/gcc/testsuite/gcc.dg/c99-flex-array-7.c +++ b/gcc/testsuite/gcc.dg/c99-flex-array-7.c @@ -6,12 +6,12 @@ struct s { int a; char b[]; }; struct s a = { 0, "" }; /* { dg-error "initialization of a flexible array member" } */ -/* { dg-error "near init" "near init" { target *-*-* } 8 } */ +/* { dg-message "near init" "near init" { target *-*-* } 8 } */ struct s b = { 0, { 0 } }; /* { dg-error "initialization of a flexible array member" } */ -/* { dg-error "near init" "near init" { target *-*-* } 10 } */ +/* { dg-message "near init" "near init" { target *-*-* } 10 } */ struct s c = { 0, { } }; /* { dg-error "ISO C forbids empty initializer braces" } */ struct s d = { .b = "" }; /* { dg-error "initialization of a flexible array member" } */ -/* { dg-error "near init" "near init" { target *-*-* } 13 } */ +/* { dg-message "near init" "near init" { target *-*-* } 13 } */ struct s e = { .b = { 0 } }; /* { dg-error "initialization of a flexible array member" } */ -/* { dg-error "near init" "near init" { target *-*-* } 15 } */ +/* { dg-message "near init" "near init" { target *-*-* } 15 } */ struct s f = { .b = { } }; /* { dg-error "ISO C forbids empty initializer braces" } */ |