>        if (tree t = maybe_new_partial_specialization (type))
>         {
> +         if (processing_template_parmlist)
> +           {
> +            /* Some syntactically invalid code can confuse the compiler into
> +               defining a specialization from inside a template parameter
> +               list.  Bail out now so that we won't ICE later.  */
> +             gcc_assert (seen_error ());
> +             return error_mark_node;
> +           }

Rather than decide it's a specialization and then fail, let's avoid
treating it as a specialization in the first place.  I think we can
add a processing_template_parmlist check at the top where we avoid
trying to specialize lambdas.

Jason

Reply via email to