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: Re: Canonical type nodes, or, comptypes considered harmful


On 11/7/06, Richard Kenner <kenner@vlsi1.ultra.nyu.edu> wrote:
>       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?

These are different types. For instance, "int" and "long" are distinct types in C++, even if both map onto 32-bit integers.

 Cheers,
 Doug


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