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: mab@dst17.wdl.loral.com (Mark A Biggar) Subject: Re: Valid Attribute and Unchecked Conversion Date: 1996/10/07 Message-ID: <53b658$c71@wdl1.wdl.lmco.com>#1/1 X-Deja-AN: 187330629 references: <3252ED6B.1B74@lmco.com> <53151i$ddd@newsbf02.news.aol.com> <32550731.167EB0E7@swl.msd.ray.com> organization: Loral Western Development Labs newsgroups: comp.lang.ada Date: 1996-10-07T00:00:00+00:00 List-Id: In article <32550731.167EB0E7@swl.msd.ray.com> Karl Cooper {46901} writes: >John Herro wrote: >> I could be wrong, but I thought that Unchecked_Conversion is erroneous in >> _any_ case. I heard that the first validated Ada compiler, Ada/Ed, took >> advantage of that fact and generated code to raise Program_Error wherever >> the program tried to make use of Unchecked_Conversion. >> Is this true, and if so, has any of it changed with Ada 95 and the new >> 'Valid attribute? >No, see the Ada83 reference manual 13.10, and the Ada95 reference >manual 13.9 and 13.9.1. Unchecked_Conversion leads to erroneous >behavior in some cases, but not in others. In my opinion, the >Ada95 reference manual is clearer when describing the safe uses >of Unchecked_Conversion. Why was the Unchecked_Conversion of an invalid scalar made erroneous in LM 95 instead of a bounded error like the coresponding uninitialized variable case? -- Mark Biggar mab@wdl.lmco.com