This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ada subtypes and base types


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]