[patch] Fix PR c++/27668

Mark Mitchell mark@codesourcery.com
Fri Jul 21 04:18:00 GMT 2006


Lee Millward wrote:


> Index: gcc/cp/pt.c
> ===================================================================
> --- gcc/cp/pt.c	(revision 115597)
> +++ gcc/cp/pt.c	(working copy)
> @@ -4069,7 +4069,8 @@ coerce_template_parms (tree parms,
>  					 in_decl);
>  
>        if (arg == error_mark_node)
> -	       lost++;
> +        return error_mark_node;
> +
>        TREE_VEC_ELT (new_inner_args, i) = arg;
>      }
>  

I'm not sure why the code is the way it presently is -- but how does
your patch help?  Before, once we exit the loop, we do:

  if (lost)
    return error_mark_node;

So, I'm confused as to how your patch makes us return error_mark_node
where we before we did not.  (Except in the pathological case of INT_MAX
+ 1 template parameters, which is not the case that you posted.)

I'm sure I'm being dreadfully dense here.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list