This is the mail archive of the gcc@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: Canonical type nodes, or, comptypes considered harmful


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]