https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89640
Bug ID: 89640 Summary: g++ chokes on lambda with __attribute__ Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redbeard0531 at gmail dot com Target Milestone: --- Regression in gcc 9 vs 8. https://godbolt.org/z/MGL0H4 void test() { []() __attribute__((noinline,cold)) { asm volatile(""); }(); } <source>: In function 'void test()': <source>:2:41: error: expected identifier before '{' token 2 | []() __attribute__((noinline,cold)) { | ^ <source>:2:41: error: type-specifier invalid in lambda Compiler returned: 1