V4 Lambda templates and implicit function templates.

Jason Merrill jason@redhat.com
Wed Sep 11 16:00:00 GMT 2013


On 09/11/2013 10:42 AM, Jason Merrill wrote:
> Sounds like the problem is that the compiler is trying to instantiate a
> function while cp_unevaluated_operand is set.  But that shouldn't be an
> issue because push_to_top_level clears cp_unevaluated_operand.  How does
> it come to be set when instantiating the local variable?

Ah, I see: it's because instantiate_decl doesn't push_to_top_level for 
function-local templates.  We still need to save/restore 
cp_unevaluated_operand in that case, and let's also do 
c_inhibit_evaluation_warnings.

Jason



More information about the Gcc-patches mailing list