aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vla-init-1.c
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2007-07-08 14:50:37 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2007-07-08 14:50:37 +0000
commitb1b8a1855f9f9c4e0462a647fe2b085d0132c03e (patch)
tree6c98b3be03827e9575c8d91dbae2c7db990c42e6 /gcc/testsuite/gcc.dg/vla-init-1.c
parent8398345541cee63fccf1baf53e5bca1ac3897a71 (diff)
downloadgcc-b1b8a1855f9f9c4e0462a647fe2b085d0132c03e.zip
gcc-b1b8a1855f9f9c4e0462a647fe2b085d0132c03e.tar.gz
gcc-b1b8a1855f9f9c4e0462a647fe2b085d0132c03e.tar.bz2
re PR testsuite/25241 ([C++] DejaGNU does not distinguish between errors and warnings)
2007-07-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR testsuite/25241 testsuite/ * gcc.dg/20041213-1.c: Don't use default -pedantic-errors to allow discern pedantic diagnostics and errors. * gcc.dg/empty2.c: Add -pedantic, so it actually produces a warning and not an error. * gcc.dg/20050121-1.c: This is an error and not a warning. * gcc.target/i386/sseregparm-2.c: Likewise. * gcc.target/i386/20060512-4.c: This is a warning and not an error. * gcc.dg/charset/attribute2.c: Likewise. * gcc.dg/bitfld-1.c: Likewise. * gcc.dg/pack-test-2.c: Likewise. * gcc.dg/940510-1.c: Match separately error and warning. * gcc.dg/array-2.c: Match separately multiple messages. The second diagnostic is a pedantic warning and not an error. * gcc.dg/pr14475.c: Match separately multiple messages. * gcc.dg/pr18809-1.c: Likewise. * gcc.dg/pr27953.c: Likewise. * gcc.dg/vla-init-1.c: Likewise. * gcc.dg/redecl-1.c: Fix wrong use of dg-error and dg-warning. From-SVN: r126461
Diffstat (limited to 'gcc/testsuite/gcc.dg/vla-init-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/vla-init-1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.dg/vla-init-1.c b/gcc/testsuite/gcc.dg/vla-init-1.c
index 61d2357..68e7d65 100644
--- a/gcc/testsuite/gcc.dg/vla-init-1.c
+++ b/gcc/testsuite/gcc.dg/vla-init-1.c
@@ -9,5 +9,7 @@ int a;
void
foo (void)
{
- int x[a] = { 1 }; /* { dg-error "init" "VLA init" } */
+ int x[a] = { 1 }; /* { dg-error "variable-sized object may not be initialized" "VLA init" } */
+ /* { dg-warning "excess elements in array initializer" "" { target *-*-* } 12 } */
+ /* { dg-warning "near initialization" "" { target *-*-* } 12 } */
}