This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49326] New: Lambda arguments should not have a default value
- From: "vanboxem.ruben at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 8 Jun 2011 16:40:45 +0000
- Subject: [Bug c++/49326] New: Lambda arguments should not have a default value
- Auto-submitted: auto-generated
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.