Commit be799b1e by Mark Mitchell Committed by Mark Mitchell

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
parent 9ce79a7a
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. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment