+2012-11-19 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55368
+ * parser.c (cp_parser_member_declaration): Emit an error in case
+ of stray comma at end of member declaration.
+
2012-11-19 Jason Merrill <jason@redhat.com>
* class.c (one_inheriting_sig): Don't inherit base copy ctors.
parser->object_scope = NULL_TREE;
/* If it's a `,', then there are more declarators. */
if (cp_lexer_next_token_is (parser->lexer, CPP_COMMA))
- cp_lexer_consume_token (parser->lexer);
+ {
+ cp_lexer_consume_token (parser->lexer);
+ if (cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON))
+ {
+ cp_token *token = cp_lexer_previous_token (parser->lexer);
+ error_at (token->location,
+ "stray %<,%> at end of member declaration");
+ }
+ }
/* If the next token isn't a `;', then we have a parse error. */
else if (cp_lexer_next_token_is_not (parser->lexer,
CPP_SEMICOLON))
+2012-11-19 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55368
+ * g++.dg/parse/struct-5.C: New.
+
2012-11-19 Tom de Vries <tom@codesourcery.com>
PR rtl-optimization/55315
-[2, 2] and -[3, 3] and -[4, 4] range tests together.
* lib/asan-dg.exp (asan_symbolize): Prune BFD: prefixed error messages
- from addr2line_output. Increment idx if asking for more than one address
- in one object.
+ from addr2line_output. Increment idx if asking for more than one
+ address in one object.
2012-11-16 Jakub Jelinek <jakub@redhat.com>
--- /dev/null
+// PR c++/55368
+
+struct A { struct B *C,; }; // { dg-error "stray" }