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
This commit is contained in:
parent
09822562e4
commit
7beb51f914
@ -1,3 +1,9 @@
|
||||
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);
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
6
gcc/testsuite/g++.dg/ext/attrib57.C
Normal file
6
gcc/testsuite/g++.dg/ext/attrib57.C
Normal file
@ -0,0 +1,6 @@
|
||||
// PR c++/87175
|
||||
// { dg-do compile }
|
||||
// { dg-options "" }
|
||||
|
||||
struct __attribute__)) foo { }; // { dg-error "expected" }
|
||||
struct __attribute__()) bar { };// { dg-error "expected" }
|
Loading…
Reference in New Issue
Block a user