This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Canonical type nodes, or, comptypes considered harmful
kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
| > typedef int foo;
| > typedef foo* foo_p;
| >
| > In a truly canonical type-node environment, "foo" would have the same
| > type node as "int" (so we couldn't produce the name "foo" in
| > diagnostics), and "foo_p" would have the same type node as "int*".
|
| But what about when you have multiple integer types that have the same
| range?
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.
-- Gaby