Commit 7beb51f9 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/87175 (__attribute__)) is ignored by the parser)

	PR c++/87175
	* parser.c (cp_parser_gnu_attributes_opt): Set ok to false
	if require_open failed.

	* g++.dg/ext/attrib57.C: New test.

From-SVN: r268443
parent 09822562
2019-02-01 Jakub Jelinek <jakub@redhat.com>
PR c++/87175
* parser.c (cp_parser_gnu_attributes_opt): Set ok to false
if require_open failed.
2019-01-31 Marek Polacek <polacek@redhat.com>
PR c++/89083, c++/80864 - ICE with list initialization in template.
......
......@@ -25768,9 +25768,11 @@ cp_parser_gnu_attributes_opt (cp_parser* parser)
cp_lexer_consume_token (parser->lexer);
/* Look for the two `(' tokens. */
matching_parens outer_parens;
outer_parens.require_open (parser);
if (!outer_parens.require_open (parser))
ok = false;
matching_parens inner_parens;
inner_parens.require_open (parser);
if (!inner_parens.require_open (parser))
ok = false;
/* Peek at the next token. */
token = cp_lexer_peek_token (parser->lexer);
2019-02-01 Jakub Jelinek <jakub@redhat.com>
PR c++/87175
* g++.dg/ext/attrib57.C: New test.
2018-02-01 Bin Cheng <bin.cheng@linux.alibaba.com>
PR tree-optimization/88932
......
// PR c++/87175
// { dg-do compile }
// { dg-options "" }
struct __attribute__)) foo { }; // { dg-error "expected" }
struct __attribute__()) bar { };// { dg-error "expected" }
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