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: PR 23046. Folding predicates involving TYPE_MAX_VALUE/TYPE_MIN_VALUE (Ada RFC)


     Both ARM 13.9.1 and the GNAT User Guide (in Section 3.2.4 Validity
     Checking) require that such reads are NOT erroneous.

It depends what "such reads" mean.  13.9.1(12) clearly says that the
result of an Unchecked_Conversion is erroneous if it isn't a valid
representation.  There are some cases, however, where an out-of-range
value is a bounded error instead of being erroneous.

However, note 20 (13.9.2) says that 'Valid is not considered a "read"
and hence its use is not erroneous.


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