]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR c++/60503 - wrong lambda attribute syntax.
authorJason Merrill <jason@redhat.com>
Mon, 5 Nov 2018 07:46:52 +0000 (02:46 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 5 Nov 2018 07:46:52 +0000 (02:46 -0500)
commitc24c8a4b003f81734c2a94e0980008c2c24659d9
treef6903db115aff5c17547f7a29decc584021ecb1f
parentac27459299b143bcd3998193530b8b69f682e778
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.

From-SVN: r265787
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-attr1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-attr2.C [new file with mode: 0644]