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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 8f2357e..0ae55a2 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -15046,7 +15046,13 @@ cp_parser_alias_declaration (cp_parser* parser)
cp_parser_require_keyword (parser, RID_USING, RT_USING);
id_location = cp_lexer_peek_token (parser->lexer)->location;
id = cp_parser_identifier (parser);
+ if (id == error_mark_node)
+ return error_mark_node;
+
attributes = cp_parser_attributes_opt (parser);
+ if (attributes == error_mark_node)
+ return error_mark_node;
+
cp_parser_require (parser, CPP_EQ, RT_EQ);
/* Now we are going to parse the type-id of the declaration. */