diff options
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index a9b62d0..284afc6 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -3849,6 +3849,11 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p) being dependent. */ if (!scope) scope = error_mark_node; + /* If the SCOPE was erroneous, make the various + semantic analysis functions exit quickly -- and + without issuing additional error messages. */ + if (scope == error_mark_node) + postfix_expression = error_mark_node; } /* Consume the `.' or `->' operator. */ |