https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58566
Vittorio Zecca <zeccav at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zeccav at gmail dot com --- Comment #2 from Vittorio Zecca <zeccav at gmail dot com> --- Still fails on 6.0.0 trunk ~/gcc-trunk/bin/g++ -S p1.C -std=c++11 p1.C: In lambda function: p1.C:5:25: error: invalid use of member function (did you forget the ‘()’ ?) [this]{ return foo; }; ^ p1.C:5:25: internal compiler error: in check_return_expr, at cp/typeck.c:8609 0x729126 check_return_expr(tree_node*, bool*) ../../gcc/gcc/cp/typeck.c:8609 0x7663fe finish_return_stmt(tree_node*) ../../gcc/gcc/cp/semantics.c:873 0x70d5c4 cp_parser_lambda_body ../../gcc/gcc/cp/parser.c:9636 0x70d5c4 cp_parser_lambda_expression ../../gcc/gcc/cp/parser.c:9141 0x6df257 cp_parser_primary_expression ../../gcc/gcc/cp/parser.c:4510 0x6eb64b cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:6201 0x6f00a9 cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7486 0x6f0ce7 cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:8223 0x6f13ef cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:8481 0x6f9b61 cp_parser_expression ../../gcc/gcc/cp/parser.c:8635 0x6fb6c6 cp_parser_expression_statement ../../gcc/gcc/cp/parser.c:10049 0x706ae5 cp_parser_statement ../../gcc/gcc/cp/parser.c:9900 0x7076a2 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:10172 0x70780b cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:10126 0x707a1b cp_parser_function_body ../../gcc/gcc/cp/parser.c:19785 0x707a1b cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:19821 0x708899 cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:24428 0x70c45c cp_parser_late_parsing_for_member ../../gcc/gcc/cp/parser.c:25232 0x6e7cc1 cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:20645 0x6e7cc1 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:20671 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.