aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index f1d5656..920cb61 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -11660,7 +11660,8 @@ cp_parser_simple_declaration (cp_parser* parser,
{
/* If we have already issued an error message we don't need
to issue another one. */
- if (decl != error_mark_node
+ if ((decl != error_mark_node
+ && DECL_INITIAL (decl) != error_mark_node)
|| cp_parser_uncommitted_to_tentative_parse_p (parser))
cp_parser_error (parser, "expected %<,%> or %<;%>");
/* Skip tokens until we reach the end of the statement. */