This is the mail archive of the gcc-bugs@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]

[Bug c++/46159] New: [4.5/4.6 Regression] Bogus warning about lambdas


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.


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