diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-20 17:29:02 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-20 17:29:02 +0000 |
commit | ed7bf2d1777de579360c76e04d30776a709ff91b (patch) | |
tree | d36f2c6f7a0499a4eebd7a3cca9991eda2ffdf69 /gcc/testsuite/g++.dg | |
parent | 7ac4254ea8c2056918ea34dc1747c5f2aacd0048 (diff) | |
download | gcc-ed7bf2d1777de579360c76e04d30776a709ff91b.tar.gz |
PR c++/63601
* lambda.c (current_nonlambda_function): New.
* semantics.c (finish_this_expr): Use it.
* cp-tree.h: Declare it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216488 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this20.C | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this20.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this20.C new file mode 100644 index 00000000000..0d273202bfb --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this20.C @@ -0,0 +1,4 @@ +// PR c++/63601 +// { dg-do compile { target c++11 } } + +auto f = []{ sizeof(this); }; // { dg-error "this" } |