This is the mail archive of the
mailing list for the GCC project.
Re: Re: Re: [PATCH] Canonical types (1/3)
> So, TYPE_NEXT_VARIANT basically contains a mish-mash of types that are
> somehow related to the TYPE_MAIN_VARIANT, but may or may not be
The issue is what does "somehow related" mean. In the past, I didn't think
that two types that had different alignments were consider sufficiently
related to have the same TYPE_MAIN_VARIANT. So it seems wrong to have that
> It's also important to note that TYPE_NEXT_VARIANT does not even
> contain all types that are equivalent to the main variant...
That's because it's not supposed to! If you think that it is, then I
think you misunderstand something significant and suggests that this part
of your patch is wrong.
TYPE_MAIN_VARIANT is supposed to be a list of type that differ *only* in
certain flags and there is supposed to be exactly *one* type for each
possible settings of the flags in the chain.
> int* and foo_t* will not occur in the same list of variants.
And should not!
> They are completely distinct type nodes, but comptypes will make them
> compare equal.
But that has nothing whatsoever to do with variants!