[PATCH] PR c++/42225

Dodji Seketeli dodji@redhat.com
Wed Dec 9 22:00:00 GMT 2009


On Wed, Dec 09, 2009 at 10:12:12AM -0500, Jason Merrill wrote:
> On 12/09/2009 07:33 AM, Dodji Seketeli wrote:
>> +  return !(tinfo1
>> +	&&  tinfo2
>> +	&&  TI_TEMPLATE (tinfo1)
>> +	&&  TI_TEMPLATE (tinfo2)
>
> Do we really need these checks?  They should always be true for a  
> dependent typedef, no?

I'd have thought so, but apparently removing the tests crashes on some
libstdc++ code, for instance. No template info was created in that case
because the typedef decl was created in a function template, not as a class
template member. So grokdeclarator creates the typedef without
DECL_LANG_SPECIFIC, so it doesn't have any template info.

> The patch is OK either way.

Thanks.

        Dodji



More information about the Gcc-patches mailing list