[RFC] Tightening up the type system
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Tue Sep 28 20:59:00 GMT 2004
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.
More information about the Gcc
mailing list