IMA vs tree-ssa

Joseph S. Myers jsm@polyomino.org.uk
Tue Mar 9 00:49:00 GMT 2004


On Mon, 8 Mar 2004, Mark Mitchell wrote:

> A type system with non-transitive type-equality breaks all the standard 
> mathematical models for type theory.  (And, yes, I know the C type 
> system is ugly, but most of it can actually be modeled in pretty 
> conventional ways.)  The category-theoretician in me is befuddled by 
> what a non-transitive type-equality model could possibly mean.

It's not type-equality, it's type-compatibility.  Equality of types also
exists, and behaves transitively.

Most of the problem cases involve incomplete types; e.g., int[] is
compatible with int[3] and int[5] which are not compatible with each
other.  But the existence of such cases means there is no general
principle of transitivity of compatibility and is what caused me to
conclude that the standard really did intend that enums compatible with
the same integer type are not compatible with each other.

-- 
Joseph S. Myers
jsm@polyomino.org.uk



More information about the Gcc mailing list