Commit d90a2542 by Paolo Carlini Committed by Paolo Carlini

parser.c (cp_parser_std_attribute_spec): When token_pair::require_open /…

parser.c (cp_parser_std_attribute_spec): When token_pair::require_open / require_close return false simply return...

2018-01-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* parser.c (cp_parser_std_attribute_spec): When
        token_pair::require_open / require_close return false simply
	return error_mark_node, avoid duplicate cp_parser_error about
	expected '(' / ')', respectively.

From-SVN: r256451
parent bbb31a1d
2018-01-10 Paolo Carlini <paolo.carlini@oracle.com>
* parser.c (cp_parser_std_attribute_spec): When
token_pair::require_open / require_close return false simply
return error_mark_node, avoid duplicate cp_parser_error about
expected '(' / ')', respectively.
2018-01-10 David Malcolm <dmalcolm@redhat.com>
PR c++/43486
......
......@@ -25321,10 +25321,7 @@ cp_parser_std_attribute_spec (cp_parser *parser)
matching_parens parens;
if (!parens.require_open (parser))
{
cp_parser_error (parser, "expected %<(%>");
return error_mark_node;
}
return error_mark_node;
cp_parser_parse_tentatively (parser);
alignas_expr = cp_parser_type_id (parser);
......@@ -25354,10 +25351,7 @@ cp_parser_std_attribute_spec (cp_parser *parser)
return error_mark_node;
if (!parens.require_close (parser))
{
cp_parser_error (parser, "expected %<)%>");
return error_mark_node;
}
return error_mark_node;
/* Build the C++-11 representation of an 'aligned'
attribute. */
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