[Bug c++/88086] gcc only allows valid expressions as unknown C++ attribute argument clause

2020-03-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88086

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Jonathan Wakely  ---
Seems like a duplicate of PR c++/92648 which is already fixed.

*** This bug has been marked as a duplicate of bug 92648 ***

[Bug c++/88086] gcc only allows valid expressions as unknown C++ attribute argument clause

2020-03-06 Thread gbuella at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88086

Gábor Buella  changed:

   What|Removed |Added

 CC||gbuella at gmail dot com

--- Comment #1 from Gábor Buella  ---
This did come up for me as well, when trying to compile:

enum [[clang::enum_extensibility(closed)]] dummy { a, b };


$ g++-8 dummy.cc
y.cc:2:34: error: ‘closed’ was not declared in this scope
 enum [[clang::enum_extensibility(closed)]] dummy { a, b };
  ^~
y.cc:2:34: note: suggested alternative: ‘class’
 enum [[clang::enum_extensibility(closed)]] dummy { a, b };
  ^~
  class
y.cc:2:44: warning: ‘clang::enum_extensibility’ scoped attribute directive
ignored [-Wattributes]
 enum [[clang::enum_extensibility(closed)]] dummy { a, b };
^


It is rather annoying, the attribute is ignored, but there is a compile error.