http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46159
Summary: [4.5/4.6 Regression] Bogus warning about lambdas
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
The following C++ code
void
f()
{
int **p = new(int(*[2]));
}
gets what seems to be a bogus diagnostic from 4.5 and 4.6:
t.C: In function 'void f()':
t.C:4:21: warning: lambda expressions only available with -std=c++0x or
-std=gnu++0x [enabled by default]
As far as I know this is valid C++98/C++03 code, not involving a lambda. 4.4
accepts it with no diagnostic.