https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60503
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Mon Nov 5 07:46:52 2018 New Revision: 265787 URL: https://gcc.gnu.org/viewcvs?rev=265787&root=gcc&view=rev Log: PR c++/60503 - wrong lambda attribute syntax. This patch fixes two issues with lambda attribute handling: First, it was in the wrong place in the grammar. Second, it was treating attributes as applying to the whole declaration rather than to the function type, as specified by the standard. * parser.c (cp_parser_lambda_declarator_opt): Fix attribute handling. Added: trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-attr1.C trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-attr2.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/parser.c