This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/46159] New: [4.5/4.6 Regression] Bogus warning about lambdas
- From: "jsm28 at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 24 Oct 2010 22:08:45 +0000
- Subject: [Bug c++/46159] New: [4.5/4.6 Regression] Bogus warning about lambdas
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: jsm28@gcc.gnu.org
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.