specifiers followed by CPP_CLOSE_BRACE.
testsuite:
* gcc.dg/struct-semi-4.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166516
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-11-09 Joseph Myers <joseph@codesourcery.com>
+
+ * c-parser.c (c_parser_struct_declaration): Handle declaration
+ specifiers followed by CPP_CLOSE_BRACE.
+
2010-11-09 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Rewrite so
return NULL_TREE;
}
finish_declspecs (specs);
- if (c_parser_next_token_is (parser, CPP_SEMICOLON))
+ if (c_parser_next_token_is (parser, CPP_SEMICOLON)
+ || c_parser_next_token_is (parser, CPP_CLOSE_BRACE))
{
tree ret;
if (!specs->type_seen_p)
+2010-11-09 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/struct-semi-4.c: New test.
+
2010-11-09 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc.target/powerpc/ppc-fpconv-11.c: Use -mcpu=power5+, not
--- /dev/null
+/* Test for missing semicolons in structures: anonymous structures and
+ similar cases. */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+struct s { struct { int a; } }; /* { dg-warning "no semicolon" } */
+int *f (struct s *p) { return &p->a; }