re PR c++/86499 (lambda-expressions with capture-default are allowed at namespace...
authorMarek Polacek <polacek@redhat.com>
Tue, 21 Aug 2018 18:37:23 +0000 (18:37 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 21 Aug 2018 18:37:23 +0000 (18:37 +0000)
commit774fb6c4eb205eaf9d3b6667e7de9c90cc1784ad
tree1eda2ec33c05aeb27bb7e881205a0ff36e5efab1
parent55082d81a0cb409d2c1a54889bbed72b369c4da8
re PR c++/86499 (lambda-expressions with capture-default are allowed at namespace scope)

PR c++/86499
* parser.c (cp_parser_lambda_introducer): Give error if a non-local
lambda has a capture-default.

* g++.dg/cpp0x/lambda/lambda-non-local.C: New test.
* g++.dg/cpp0x/lambda/lambda-this10.C: Adjust dg-error.

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