This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r153617 - in /trunk/gcc: cp/ChangeLog cp/call.c...


Author: jason
Date: Tue Oct 27 21:58:09 2009
New Revision: 153617

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153617
Log:
	Allow no-capture lambdas to convert to function pointer.
	* semantics.c (maybe_add_lambda_conv_op): New.
	* parser.c (cp_parser_lambda_expression): Call it.
	(cp_parser_lambda_declarator_opt): Make op() static if
	no captures.
	* mangle.c (write_closure_type_name): Adjust.
	* semantics.c (finish_this_expr): Adjust.
	* decl.c (grok_op_properties): Allow it.
	* call.c (build_user_type_conversion_1): Handle static conversion op.
	(build_op_call): And op().

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/cp/class.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/mangle.c
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const-neg.C
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-non-const.C


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]