Ada subtypes and base types
Robert Dewar
dewar@adacore.com
Tue Feb 21 19:19:00 GMT 2006
Jeffrey A Law wrote:
> On Tue, 2006-02-21 at 13:57 -0500, Richard Kenner wrote:
>> Can a conforming program set the object to a value outside of
>> TYPE_MIN_VALUE/TYPE_MAX_VALUE.
>>
>> Let's forget about the obscure unchecked conversion -> 'Valid case
>> because we're going to handle that in whatever way we need to.
>>
>> So the answer is "no".
> OK. So if a program sets an object to a value outside
> TYPE_MIN_VALUE/TYPE_MAX_VALUE, then that program is
> invalid for the purposes of this discussion?
The program is either erroneous, in which case we don't have
to discuss it, or the invalid value is the result of a bounded
error, and we have to do something vaguely reasonable (use
the out of range value, for example, and possibly blow up
as a result).
>
> Jeff
More information about the Gcc
mailing list