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
+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.
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
--- /dev/null
+// PR c++/87175
+// { dg-do compile }
+// { dg-options "" }
+
+struct __attribute__)) foo { }; // { dg-error "expected" }
+struct __attribute__()) bar { };// { dg-error "expected" }