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: Ken Garlington Subject: Re: Valid Attribute and Unchecked Conversion Date: 1996/10/10 Message-ID: <325D44F2.32F5@lmtas.lmco.com>#1/1 X-Deja-AN: 188729358 references: <1996Oct1.100608.1@eisner> content-type: text/plain; charset=us-ascii organization: Lockheed Martin Tactical Aircraft Systems mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.02 (Macintosh; I; 68K) Date: 1996-10-10T00:00:00+00:00 List-Id: Robert Dewar wrote: > > Keith is right, this is in the RM, but I think the RM is definitely wrong > here. I take part of the blame, I simply did not notice this particular > mistake. Obviously for scalar types, unchecked conversion (where the sizes > are the same) should not result in erroneous behavior, and a subsequent > call to 'Valid should also be non-erroneous. > > I simply missed this because it is in the wrong section (not under UC). > Anyway, certainly GNAT behaves in a sensible manner here, and hopefully > all other Ada 95 compilers will too, so this mistake should have only > very limited impact. Can't we go a little further, and write an AI (similar to the Ada 83 AI on unchecked conversion between scalars of the same size) to formally document what should happen? It's good that the AARM says "act sensibly," but wouldn't an AI be better? -- LMTAS - "Our Brand Means Quality" For more info, see http://www.lmtas.com or http://www.lmco.com