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: Sun, 26 Aug 2012 01:09:21 +0200 (CEST)
- Subject: Re: internal compiler error using lambda and this
- References: <2773418.W3EzvajsKq@linux-cbxk.site>
On Tue, 29 May 2012, Andreas Karrenbauer wrote:
> To whom it may concern:
>
> Please find a small code example which causes an internal compiler error with
> g++-4.7 (opensuse):
Thanks for the report, Andreas.
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; };
^
And seeing that you used openSUSE, the GCC 4.7.1 based system compiler
of openSUSE 12.2 now issues
$ g++ x.cc
x.cc:1:6: error: ‘foo’ does not name a type
Note, the best way to report bugs so that they get tracked properly
is via our bug tracker at http://gcc.gnu.org/bugzilla/ .
Gerald