diff options
author | Joseph Myers <joseph@codesourcery.com> | 2004-11-04 16:16:37 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2004-11-04 16:16:37 +0000 |
commit | 68e6421d0be74ff2f6a604b9d5739d2d42b7732a (patch) | |
tree | c83a0c83634b069528a2df396482a04da2a4f3bd /gcc/testsuite/gcc.dg/init-empty-3.c | |
parent | da54323470d1d8875c17b6e651838211d933b0d4 (diff) | |
download | gcc-68e6421d0be74ff2f6a604b9d5739d2d42b7732a.zip gcc-68e6421d0be74ff2f6a604b9d5739d2d42b7732a.tar.gz gcc-68e6421d0be74ff2f6a604b9d5739d2d42b7732a.tar.bz2 |
asm-qual-1.c, [...]: New tests.
* gcc.dg/asm-qual-1.c, gcc.dg/declspec-15.c, gcc.dg/declspec-16.c,
gcc.dg/declspec-17.c, gcc.dg/empty-source-1.c,
gcc.dg/empty-source-2.c, gcc.dg/empty-source-3.c,
gcc.dg/extra-semi-1.c, gcc.dg/extra-semi-2.c,
gcc.dg/extra-semi-3.c, gcc.dg/gnu-cond-expr-1.c,
gcc.dg/gnu-cond-expr-2.c, gcc.dg/gnu-cond-expr-3.c,
gcc.dg/init-empty-1.c, gcc.dg/init-empty-2.c,
gcc.dg/init-empty-3.c, gcc.dg/noncompile/old-style-parm-1.c,
gcc.dg/noncompile/old-style-parm-2.c, gcc.dg/stmt-expr-1.c,
gcc.dg/stmt-expr-2.c, gcc.dg/stmt-expr-3.c: New tests.
From-SVN: r90066
Diffstat (limited to 'gcc/testsuite/gcc.dg/init-empty-3.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/init-empty-3.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/init-empty-3.c b/gcc/testsuite/gcc.dg/init-empty-3.c new file mode 100644 index 0000000..792d171 --- /dev/null +++ b/gcc/testsuite/gcc.dg/init-empty-3.c @@ -0,0 +1,9 @@ +/* Test diagnostic for empty initializer braces. Test with + -pedantic-errors. */ +/* Origin: Joseph Myers <joseph@codesourcery.com> */ +/* { dg-do compile } */ +/* { dg-options "-std=gnu99 -pedantic-errors" } */ + +struct s { int a; } x = { }; /* { dg-error "error: ISO C forbids empty initializer braces" } */ + +struct s *p = &(struct s){ }; /* { dg-error "error: ISO C forbids empty initializer braces" } */ |