diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/parser.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 976b075..c6a5f94 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,10 @@ 2004-01-19 Mark Mitchell <mark@codesourcery.com> + PR c++/13651 + * parser.c (cp_parser_postfix_expression): When encountering + incomplete type on left-hand side of "->" or ".", treat the entire + expression as erroneous. + PR c++/13592 * call.c (build_field_call): Remove. (n_build_method_call): Likewise. 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. */ |