re PR c++/13651 (double error message when using incomplete types in a struct)
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. From-SVN: r76180
This commit is contained in:
parent
9ce79a7a5e
commit
be799b1e0a
@ -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.
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user