This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: internal compiler error using lambda and this
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Andreas Karrenbauer <andreas dot karrenbauer at uni-konstanz dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 27 Aug 2012 10:40:28 +0200 (CEST)
- Subject: Re: internal compiler error using lambda and this
- References: <2773418.W3EzvajsKq@linux-cbxk.site> <alpine.LNX.2.00.1208260105210.5727@ghan.fvgr>
On Sun, 26 Aug 2012, Gerald Pfeifer wrote:
> I tried this with a current snapshot of what will become GCC 4.8.0
> in several months, and now get this:
>
> $ cat x.cc
> auto foo = [&](int a) { return a > this->b; };
>
> $ g++ x.cc
> x.cc:1:6: error: 'foo' does not name a type
> auto foo = [&](int a) { return a > this->b; };
> ^
It has been pointed out to me (Thanks!) that this requires
-std=c++0x to show the internal compiler error.
I reproduced this with current development sources and reported
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54383
Internal compiler error for lamba function using this-> with -std=c++0x
Thanks,
Gerald