[Bug c++/44160] [C++0x] a mysterious error on __func__ in a lambda expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44160 Jason Merrill changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Target Milestone|--- |4.7.0 --- Comment #9 from Jason Merrill 2011-06-17 00:08:46 UTC --- Fixed for 4.7.
[Bug c++/44160] [C++0x] a mysterious error on __func__ in a lambda expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44160 --- Comment #8 from Jason Merrill 2011-06-16 22:09:32 UTC --- Author: jason Date: Thu Jun 16 22:09:28 2011 New Revision: 175123 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175123 Log: PR c++/44160 * parser.c (cp_parser_lambda_body): Share code between simple and complex cases instead of using cp_parser_function_body. Added: trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-__func__.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog
[Bug c++/44160] [C++0x] a mysterious error on __func__ in a lambda expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44160 Jason Merrill changed: What|Removed |Added Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org |gnu.org |
[Bug c++/44160] [C++0x] a mysterious error on __func__ in a lambda expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44160 --- Comment #7 from Paolo Carlini 2011-05-10 11:42:41 UTC --- A do_pushlevel(sk_block) missing?
[Bug c++/44160] [C++0x] a mysterious error on __func__ in a lambda expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44160 --- Comment #5 from Paolo Carlini 2011-05-10 10:54:31 UTC --- More debugging: fname_decl, called by finish_fname, returns error_mark_node, whereas it doesn't for, eg, 'const char* f() { return __func__; }'. Note the argument to finish_fname is completely similar in the two cases.
[Bug c++/44160] [C++0x] a mysterious error on __func__ in a lambda expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44160 Paolo Carlini changed: What|Removed |Added CC||paolo.carlini at oracle dot ||com --- Comment #6 from Paolo Carlini 2011-05-10 11:10:21 UTC --- I found where exactly things go wrong first: in cp_make_fname_decl, current_binding_level->kind is sk_function_parms, thus error_mark_node is returned. In the aforementioned case of f(), it's sk_block, makes sense. Jason, any tip about this meaningless binding level?
[Bug c++/44160] [C++0x] a mysterious error on __func__ in a lambda expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44160 --- Comment #4 from Paolo Carlini 2011-05-10 10:09:15 UTC --- Things go wrong well before check_return_expr: in cp_parser_lambda_body, cp_parser_expression returns error_mark_node.
[Bug c++/44160] [C++0x] a mysterious error on __func__ in a lambda expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44160 Paolo Carlini changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2011.05.10 09:51:19 Ever Confirmed|0 |1 --- Comment #3 from Paolo Carlini 2011-05-10 09:51:19 UTC --- Oops, indeed. Thanks.
[Bug c++/44160] [C++0x] a mysterious error on __func__ in a lambda expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44160 --- Comment #2 from Jason Merrill 2011-05-10 04:54:14 UTC --- No, the return type should be deduced as const char *.
[Bug c++/44160] [C++0x] a mysterious error on __func__ in a lambda expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44160 --- Comment #1 from Paolo Carlini 2011-05-09 23:52:04 UTC --- 4.5.3, 4.6 and mainline say: 44160.C: In lambda function: 44160.C:3:27: error: return-statement with a value, in function returning 'void' [-fpermissive] Is it good enough?