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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,45a9122ddf5fcf5 X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Rules for Representation of Subtypes Date: 1996/09/30 Message-ID: #1/1 X-Deja-AN: 186372838 references: <1996Sep26.191257.1@eisner> <1996Sep28.155354.1@eisner> content-type: text/plain; charset=ISO-8859-1 organization: Estormza Software mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-09-30T00:00:00+00:00 List-Id: In article , dewar@schonberg.cs.nyu.edu (Robert Dewar) wrote: >"I think his comment was in reaction a previous post, which stated that the >compiler would make all kinds of optimizations based on what it knew was an >illegal program as a result of a call to unchecked_conversion. If the >compiler does something "special" to handle a "bad" program because of >unchecked_conversion, well, the conversion is not really "unchecked," >right?" > >Can you be clearer as to what you mean? For a start I assume that the >use of the word illegal should be erroneous? right? >unchecked simply means that the compiler is not required to generate >checking code for some error conditions, what else do you read into the >word? You're right; I should have said "...knew would cause erroneous program execution..." Honestly, though, I'm a little shaky about the difference between "erroneous execution," "bounded errors," "non portability," and "illegal program." Guess I better hit the books before TRI-Ada! I intended "unchecked" to mean as you suggested: don't put in checks for error conditions (on the object that is returned by the call to Unchecked_Conversion). The author of the post (I think it was Larry K) just wanted to make sure that the expression containing the Valid attribute didn't get optimized away. -------------------------------------------------------------------- Matthew Heaney Software Development Consultant mheaney@ni.net (818) 985-1271