Commit 01c53a74 by Jason Merrill Committed by Jason Merrill

* parser.c (cp_parser_nested_name_specifier_opt): Avoid redundant error.

From-SVN: r274893
parent 9bf6c63d
2019-08-22 Jason Merrill <jason@redhat.com>
* parser.c (cp_parser_nested_name_specifier_opt): Avoid redundant
error.
2019-08-23 Marek Polacek <polacek@redhat.com>
PR c++/91521 - wrong error with operator->.
......
......@@ -6420,9 +6420,11 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser,
== CPP_SCOPE))
{
token = cp_lexer_consume_token (parser->lexer);
error_at (token->location, "%<decltype%> evaluates to %qT, "
"which is not a class or enumeration type",
token->u.tree_check_value->value);
tree dtype = token->u.tree_check_value->value;
if (dtype != error_mark_node)
error_at (token->location, "%<decltype%> evaluates to %qT, "
"which is not a class or enumeration type",
dtype);
parser->scope = error_mark_node;
error_p = true;
/* As below. */
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