aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/anon-struct-6.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/anon-struct-6.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/anon-struct-6.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/anon-struct-6.c b/gcc-4.9/gcc/testsuite/gcc.dg/anon-struct-6.c
new file mode 100644
index 000000000..8ce14f484
--- /dev/null
+++ b/gcc-4.9/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 } */