https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95883
Bug ID: 95883 Summary: Attributes on lambdas appear to be parsed in the wrong place Product: gcc Version: 9.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: drewb at valvesoftware dot com Target Milestone: --- Created attachment 48782 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48782&action=edit Artificial source test case In 90333 there's a discussion of where attributes on lambdas should be processed. In 8.3 they were handled after the declarator but that regressed in 9. 90333 says that it was fixed to work properly after the declarator and that they also added support for attributes before the declarator. However in testing against 9.3 attributes after the declarator do not work so it does not look like the fix is working. cppreference says that lambda attributes should come after the declarator. Testing with godbolt it looks like attributes after the declarator are the common case (for example clang works on the test case and fails with attributes before the declarator).