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
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: doug dot gregor at gmail dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 07 Nov 2006 14:58:17 EST
- Subject: Re: Canonical type nodes, or, comptypes considered harmful
- References: <1A16D953-52B9-45E4-9FFE-741C5A9EF2AF@cs.indiana.edu>
> 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? Certainly you can't treat all of them as the same because they
have different alias sets and it's ciritical for efficient code generation
that this be the case.
Or would you consider these different types?