diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/anon-struct-6.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/anon-struct-6.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/anon-struct-6.c b/gcc/testsuite/gcc.dg/anon-struct-6.c new file mode 100644 index 000000000..8ce14f484 --- /dev/null +++ b/gcc/testsuite/gcc.dg/anon-struct-6.c @@ -0,0 +1,12 @@ +/* Test diagnostics for structure member with no type specifier or + declarator. Test with no special options. */ +/* Origin: Joseph Myers <joseph@codesourcery.com> */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +struct s { + int a; + const; +}; +/* { dg-warning "useless type qualifier in empty declaration" "empty" { target *-*-* } 9 } */ +/* { dg-warning "empty declaration" "empty 2" { target *-*-* } 9 } */ |