On Mon, 2006-02-27 at 20:08 +0100, Waldek Hebisch wrote: > What do you mean by "abuse"? TYPE_MAX_VALUE means maximal value > allowed by given type. As long as you're *absolutely* clear that a variable with a restricted range can never hold a value outside that the restricted range in a conforming program, then I'll back off the "abuse" label and merely call it pointless :-)
The scheme you're using "promoting" to a base type before all arithmetic creates lots of useless type conversions and means that the optimizers can't utilize TYPE_MIN_VALUE/TYPE_MAX_VALUE anyway. ie, you don't gain anything over keeping that knowledge in the front-end. jeff