On Tue, 2006-02-21 at 16:24 -0500, Richard Kenner wrote: > So, back to my example. If I have an object with a range [0, > 0x7ff fffff] based on the type of the object and I add one to that > object, then I can safely conclude that the result of the addition has > the range [1, 0x7fffffff]. Right? > > If the addition were in the type of the object, yes. But it's not supposed > to be. It's supposed to be in the *base type* of the object which won't > have the TYPE_MAX_VALUE restriction so that nobody would try to conclude > that there was an upper-bound limit. ?!? WTF
Given an expression, we have to do computations in some other type than the type of the expression? Now that's just silly. If the expression has some type X, then we should be doing our computations in type X. Not the basetype X'. If Ada really expects this throughout GCC, then we've got some major underlying problems. Jeff