re PR c++/77791 (ICE on invalid C++11 code with redefined function parameter: tree...
authorJakub Jelinek <jakub@redhat.com>
Tue, 4 Oct 2016 15:34:16 +0000 (17:34 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 4 Oct 2016 15:34:16 +0000 (17:34 +0200)
commitf72da967576271070086b2252a8463bb69f93abd
tree2b161d1369bfc1f4e27eaab39000b1f0df64d3ca
parentbfecd57cd46ac368213f55fc4a3ff67c8c59c5ea
re PR c++/77791 (ICE on invalid C++11 code with redefined function parameter: tree check: expected tree that contains ‘decl minimal’ structure, have ‘error_mark’ in cp_parser_lambda_declarator_opt, at cp/parser.c:1011)

PR c++/77791
* parser.c (cp_parser_lambda_declarator_opt): Only pedwarn
for C++11 on decls in the param_list.  Test cxx_dialect < cxx14 before
the loop just once.

* g++.dg/cpp0x/lambda/lambda-77791.C: New test.

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