re PR c++/89640 (g++ chokes on lambda with __attribute__)
authorJakub Jelinek <jakub@redhat.com>
Sat, 2 Nov 2019 06:53:53 +0000 (07:53 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 2 Nov 2019 06:53:53 +0000 (07:53 +0100)
commit628be4ef7078d5fcbd0096f7b11fb9a24e4da08a
treef86c1070852444331f12cbca2368507e6e82a875
parent1afe39ac14274d1ce4ffdf9f80833c53175e8581
re PR c++/89640 (g++ chokes on lambda with __attribute__)

PR c++/89640
* parser.c (cp_parser_decl_specifier_seq): Don't parse attributes
if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR.

* g++.dg/cpp1z/attr-lambda1.C: New test.
* g++.dg/ext/attr-lambda2.C: New test.

From-SVN: r277741
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/attr-lambda1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/attr-lambda2.C [new file with mode: 0644]