This is the mail archive of the
mailing list for the GCC project.
Re: Re: [PATCH] Canonical types (1/3)
[Also dropping firstname.lastname@example.org; sorry for the cross-post noise]
On 28 Nov 2006 08:51:49 -0800, Ian Lance Taylor <email@example.com> wrote:
"Steven Bosscher" <firstname.lastname@example.org> writes:
> On 11/28/06, Doug Gregor <email@example.com> wrote:
> > * tree.h (TYPE_CANONICAL): New.
> > (TYPE_STRUCTURAL_EQUALITY): New.
> > (struct tree_type): Added structural_equality, unused_bits,
> > canonical fields.
> If I understand your patches correctly, this stuff is only needed for
> the C-family languages. So why steal two pointers on the generic
> struct tree_type? Are you planning to make all front ends use these
> fields, or is it just additional bloat for e.g. Ada, Fortran, Java?
It seems to me that all the frontends should use these fields.
Hopefully we can use it as a lever to eliminate the types_compatible_p
Ideally, every front end would use canonical types, because every
language needs to compare types for equality. I, personally, only have
enough knowledge of the C++ front end (and the C common bits) to do a
decent job there. Now that the infrastructure is in place, converting
another front end involves (1) changing "comptypes" in the same way
that I did for the C++ front end and (2) locating all
language-specific type constructors and handling canonical types