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++/28594


Lee Millward wrote:

> 2006-08-05  Lee Millward  <lee.millward@codesourcery.com
> 
>        PR c++/28594
>        * pt.c (process_template_parm): Robustify.
> 
> testsuite/
> 
> 2006-08-05  Lee Millward  <lee.millward@codesourcery.com>
> 
>        PR c++/28594
>        * g++.dg/template/void3.C: New test.


> +  if (list && tree_last (list) != error_mark_node)

That introduces two calls to tree_last, which is more itereation that we
need.  Let's pull the temporary "p" out to the block containing the
"if", so that we can do:

  p = tree_last (list);
  if (p && p != error_mark_node)
    {
      p = TREE_VALUE (p);
      ...
    }

That variant is pre-approved.

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]