From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f70e7a457bf23e69 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-25 10:09:33 PST Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!uni-duisburg.de!zib-berlin.de!news.mathworks.com!news.duke.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!math.ohio-state.edu!sol.ctr.columbia.edu!proto.ida.org!wheeler From: wheeler@ida.org (David Wheeler) Newsgroups: comp.lang.ada Subject: Re: Optimizing and Constraint Checks Date: 25 Mar 1995 18:09:33 GMT Organization: IDA, Alexandria, Virginia Message-ID: <3l1m8t$eon@dmsoproto.ida.org> References: <3kuhpo$ban@theopolis.orl.mmc.com> NNTP-Posting-Host: oids-3.csed.ida.org X-Newsreader: TIN [version 1.2 PL0] Date: 1995-03-25T18:09:33+00:00 List-Id: Theodore Dennison (dennison@escmail.orl.mmc.com) wrote: : Ed Bruce writes: : > I am currently attempting to implement a safe, portable : > Unchecked_Conversion of an enumerated type to integer and from an integer : > type back to the enumeration. : Your engineer has a vaild concern. One of the problems with Ada 83 is that : there is no PORTABLE way to force a constraint check. In practice, you have : to find what your compiler won't optimize away, and code to that. : Unfortunately, the next version of the same compiler could work differently. : Hopefully, this problem was fixed with Ada 95. See the new 'Valid attribute. --- David A. Wheeler Net address: wheeler@ida.org