This is the mail archive of the gcc-patches@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]

Re: [patch] Fix PR c++/27668


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


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