This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: internal compiler error using lambda and this


On 08/26/2012 01:09 AM, Gerald Pfeifer wrote:
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; };
         ^

This is just the error message you get when you try to compile a program which uses type inference in non-C++11 mode. Trunk and 4.7.1 still crash on this example program.


Andreas, would you please file a bug in Bugzilla?


-- Florian Weimer / Red Hat Product Security Team


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]