From: Jason Merrill Date: Wed, 9 Nov 2011 17:52:57 +0000 (-0500) Subject: parser.c (cp_parser_alias_declaration): Don't do semantic processing if parsing failed. X-Git-Tag: releases/gcc-4.7.0~2304 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78d16361e1d3052e65d18229d6919d15d7bd21ff;p=thirdparty%2Fgcc.git parser.c (cp_parser_alias_declaration): Don't do semantic processing if parsing failed. * parser.c (cp_parser_alias_declaration): Don't do semantic processing if parsing failed. From-SVN: r181218 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7ebe23fb8ebe..c97553092de1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-11-09 Jason Merrill + + * parser.c (cp_parser_alias_declaration): Don't do semantic + processing if parsing failed. + 2011-11-09 Paolo Carlini PR c++/51045 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 931c593a447d..3cb6dbf61a05 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -14946,6 +14946,9 @@ cp_parser_alias_declaration (cp_parser* parser) type = cp_parser_type_id (parser); cp_parser_require (parser, CPP_SEMICOLON, RT_SEMICOLON); + if (cp_parser_error_occurred (parser)) + return error_mark_node; + /* A typedef-name can also be introduced by an alias-declaration. The identifier following the using keyword becomes a typedef-name. It has the same semantics as if it were introduced by the typedef