PATCH COMMITTED: Don't break tests for enum in range
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Thu Jun 7 18:37:00 GMT 2007
> So, the most obvious answer to these points is that arithmetic is
> always performed in a type where TYPE_MIN/MAX_VALUE is
> naturally defined and so we can rely on two's complement arithmetic.
Right. In the Ada case, that's required by the language anyway.
> The question that is retained is, when we expose types with non-natural
> TYPE_MIN/MAX_VALUE to the middle-end, how do we handle
> conversions between the "base" and the "derived" type. Is it
> value-preserving, even if the value is outside of the "derived" types
> bounds? If not, how is it "truncated"?
I think it goes to the same question as before, which is what's meant if
the value is out of range. The answer to that question (which I tried to
propose a solution to in my last email) is the answer to this one, the
way I see it.
More information about the Gcc
mailing list