[patch] Fix C++ PRs 28736, 28737 and 28738

Lee Millward lee.millward@codesourcery.com
Mon Aug 21 20:39:00 GMT 2006


On 8/21/06, Mark Mitchell <mark@codesourcery.com> wrote:
> What kinds of situations trigger a type with CLASSTYPE_TI_TEMPLATE set
> to error_mark_node?

The testcase which triggers this behaviour is:

template<void> struct A
{
    template<typename> friend struct B;
};

template<typename> struct B {};

B<int> b;

Judging from your comments you feel a better fix would be to find the
point at which CLASSTYPE_TI_TEMPLATE becomes the error_mark_node and
take action accordingly, rather than allow things to continue?

> Separately, maybe instead of
>
>        PR c++/28737
>        PR c++/28738
>        * pt.c (process_partial_specialization): Robustify.
>
> we should instead arrange that the entry in the parameter list is not
> error_mark_node, but a TREE_LIST node with an error_mark as its
> TREE_VALUE?  It seems like we're running into problems because we've
> introduced a typing violation; we expect these vectors to contain
> TREE_LISTs, and now they sometimes contain an unvarnished error_mark_node.

Thanks for the suggestion, I'll take a look at implementing this.

Cheers,
Lee.



More information about the Gcc-patches mailing list