Canonical type nodes, or, comptypes considered harmful

Mark Mitchell mark@codesourcery.com
Tue Nov 7 22:37:00 GMT 2006


Richard Kenner wrote:
>> Like when int and long have the same range on a platform?
>> The answer is they are different, even when they imply the same object
>> representation.
>>
>> The notion of unified type nodes is closer to syntax than semantics.
> 
> I'm more than a little confused, then, as to what we are talking about
> canonicalizing.  We already have only one pointer to each type, for example.

Yes, but to compare two types, you have to recur on them, because of 
typedefs.  In:

   typedef int I;

"int *" and "I *" are distinct types, and you have to drill down to "I" 
to figure that out.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc mailing list