This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Tightening up the type system
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: aph at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 28 Sep 04 14:11:12 EDT
- Subject: Re: [RFC] Tightening up the type system
It's an interesting view. I'm pretty sure that we violate this is the
Java FE in a few places, but perhaps we shouldn't. The trouble is
that the GENERIC type system has never been so well-defined.
That's true, however, I've always treated GENERIC's type system as
being very strict: the types must *exactly* agree. Certainly the Ada
front end goes to a lot of trouble to make that happen in the trees it
generates. I think there has been some code that assumes
type-correctness, but not much.
In GIMPLE, we relax this to allow any types that are type_compatible_p.
I'm sure that enforcing this would break things and it would take some
time to find and fix them all.
On the other hand, *not* enforcing this looks like it's causing problems
for the optimizers. Those problems are going to be harder to find and
fix than typing violations in the front end.