http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49482
Summary: [regression][4.6.1-RC-20110620][C++0x] unused parameter warning on lambda in function template Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: gintensub...@gmail.com testsuite (bug.cc): template<class T> void f() { []( bool b ){ return b; }; } int main() { f<int>(); } message: bug.cc: In static member function 'static bool f() [with T = int]::<lambda(bool) >::_FUN(bool)': bug.cc:3:4: instantiated from 'f() [with T = int]::<lambda(bool)>' bug.cc:3:3: instantiated from 'void f() [with T = int]' bug.cc:8:10: instantiated from here bug.cc:3:14: warning: parameter 'b' set but not used [-Wunused-but-set-parameter ] version: gcc-4.6.1-RC-20110620 note: gcc-4.6-20110527 doesn't raise such a warning.