[patch] Fix PR c++/28594
Mark Mitchell
mark@codesourcery.com
Mon Aug 14 16:53:00 GMT 2006
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
More information about the Gcc-patches
mailing list