http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46124
Summary: ICE: tree check: expected var_decl or function_decl, have error_mark in cp_parser_lambda_declarator_opt, at cp/parser.c:7817 on invalid lambda function Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz ----- testcase2.C ----- void foo() { [] () -> void (); } ----------------------- Compiler output: $ gcc testcase2.C -std=c++0x testcase2.C: In function 'void foo()': testcase2.C:1:29: error: 'operator()' declared as function returning a function testcase2.C:1:29: internal compiler error: tree check: expected var_decl or function_decl, have error_mark in cp_parser_lambda_declarator_opt, at cp/parser.c:7817 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Tested revisions: r165768 - crash r153685 - crash 4.4 r165754 - doesn't recognise lambdas