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++/49326] New: Lambda arguments should not have a default value


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49326

           Summary: Lambda arguments should not have a default value
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: vanboxem.ruben@gmail.com


Currently, GCC 4.6.1 warns in pedantic mode when a lambda is written that
provides  default value for an argument:

[](bool a, bool=true){ return !a;} }

Which, according to the FDIS n3290 section 5.1.2/5, should be illegal and thus
give an error. 


As the detection code is already present/functional (in -pedantic mode),
changing that into an error shouldn't be hard.


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