Re: [PATCH 1/4] Support lambda templates.

2013-09-09 Thread Adam Butcher
Hi Jason, I've attached a patch that handles parameter packs in the conversion op. I thought it best to get this reviewed independently before rolling up into the 'Support lambda templates' patch. Do you think it's the right idea? It seems to work okay but I've reworked the way the

Re: [PATCH 1/4] Support lambda templates.

2013-09-09 Thread Jason Merrill
On 09/09/2013 03:22 AM, Adam Butcher wrote: I've attached a patch that handles parameter packs in the conversion op. I thought it best to get this reviewed independently before rolling up into the 'Support lambda templates' patch. Do you think it's the right idea? It seems to work okay but

Re: [PATCH 1/4] Support lambda templates.

2013-09-05 Thread Adam Butcher
On 03.09.2013 22:25, Jason Merrill wrote: On 09/03/2013 03:50 PM, Adam Butcher wrote: Problem is that no RTL is set for the incoming parms in the instantiation of the expansion. It ICEs in gimple_expand_cfg because 'DECL_RTL_IF_SET (var)' returns nullptr for the incoming parms resulting in a

Re: [PATCH 1/4] Support lambda templates.

2013-09-05 Thread Adam Butcher
On 05.09.2013 20:14, Adam Butcher wrote: On 03.09.2013 22:25, Jason Merrill wrote: On 09/03/2013 03:50 PM, Adam Butcher wrote: Problem is that no RTL is set for the incoming parms in the instantiation of the expansion. It ICEs in gimple_expand_cfg because 'DECL_RTL_IF_SET (var)' returns

Re: [PATCH 1/4] Support lambda templates.

2013-09-03 Thread Adam Butcher
On 03.09.2013 04:50, Jason Merrill wrote: On 09/02/2013 05:18 PM, Adam Butcher wrote: will focus on the parameter pack stuff (when I get a chance). Sounds good. I had a quick hack at getting pack expansion working for the conversion op. The syntactic side seems to be okay. It gets all the

Re: [PATCH 1/4] Support lambda templates.

2013-09-03 Thread Jason Merrill
On 09/03/2013 03:50 PM, Adam Butcher wrote: Problem is that no RTL is set for the incoming parms in the instantiation of the expansion. It ICEs in gimple_expand_cfg because 'DECL_RTL_IF_SET (var)' returns nullptr for the incoming parms resulting in a failed assertion that

Re: [PATCH 1/4] Support lambda templates.

2013-09-02 Thread Adam Butcher
On 01.09.2013 21:22, Jason Merrill wrote: On 08/27/2013 03:42 PM, Adam Butcher wrote: + vec_safe_push (argvec, arg); I bet we want convert_from_reference in the non-generic lambda case, too. OK with that change. I think I had made that change originally to keep the two impls the

Re: [PATCH 1/4] Support lambda templates.

2013-09-02 Thread Jason Merrill
On 09/02/2013 02:30 PM, Adam Butcher wrote: I think I had made that change originally to keep the two impls the same and I hit issues with non-generic lambdas. But I can't remember the details. I'll try again. If it works with convert_from_reference in both cases should I push or should I

Re: [PATCH 1/4] Support lambda templates.

2013-09-02 Thread Adam Butcher
On 02.09.2013 19:34, Jason Merrill wrote: On 09/02/2013 02:30 PM, Adam Butcher wrote: On 01.09.2013 21:22, Jason Merrill wrote: I bet we want convert_from_reference in the non-generic lambda case, too. I think I had made that change originally to keep the two impls the same and I hit

Re: [PATCH 1/4] Support lambda templates.

2013-09-02 Thread Jason Merrill
On 09/02/2013 05:18 PM, Adam Butcher wrote: Will assume, for now, that the convert_from_reference call is not wanted in the non-generic case (maybe something to do with using 'build_call_a' instead of 'build_nt_call_vec' or the convert_from_reference on the call itself?) Ah, yes; we are

Re: [PATCH 1/4] Support lambda templates.

2013-09-01 Thread Jason Merrill
On 08/27/2013 03:42 PM, Adam Butcher wrote: + vec_safe_push (argvec, arg); I bet we want convert_from_reference in the non-generic lambda case, too. OK with that change. Jason

[PATCH 1/4] Support lambda templates.

2013-08-27 Thread Adam Butcher
* parser.c (cp_parser_lambda_declarator_opt): Accept template parameter list with std=c++1y or std=gnu++1y. (cp_parser_lambda_body): Don't call 'expand_or_defer_fn' for lambda call operator template to avoid adding template result to symbol table. * lambda.c