[Bug c++/90489] Attributes no longer allowed in lambdas with trailing return type

2019-05-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90489

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #2 from Jonathan Wakely  ---
Looks like a dup

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

[Bug c++/90489] Attributes no longer allowed in lambdas with trailing return type

2019-05-15 Thread mathias at gaunard dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90489

--- Comment #1 from Mathias Gaunard  ---
Possibly related,
Both
auto const f = [](int) [[gnu::always_inline]] -> int { return 0; };
and
auto const f = [](int) [[gnu::always_inline]] { return 0; };

also fail with GCC 9.1, but work with GCC 8.2.

says:
:1:50: warning: attribute ignored [-Wattributes]

1 | auto const f = [](int) [[gnu::always_inline]] -> int { return 0; };

  |  ^~~

:1:50: note: an attribute that appertains to a type-specifier is
ignored