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: bobduff@world.std.com (Robert A Duff) Subject: Re: Valid Attribute and Unchecked Conversion Date: 1996/10/14 Message-ID: #1/1 X-Deja-AN: 189196597 references: <3252ED6B.1B74@lmco.com> <53151i$ddd@newsbf02.news.aol.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-10-14T00:00:00+00:00 List-Id: In article , Keith Thompson wrote: >But RM95-13.9.1(12) says: > A call to an imported function or an instance of > Unchecked_Conversion is erroneous if the result > is scalar, and the result object has an invalid > representation. > >Probably that paragraph should have been in 13.9 rather than 13.9.1. True. >Note that there are several paragraphs after this in the AARM encouraging >implementations to behave sensibly: > > [...] We considered requiring such sensible behavior, > but it resulted in too much arcane verbiage, and > since implementations have little incentive to behave > irrationally, such verbiage is not important to have. > >So implementations are encouraged to implement sensibly something that >users are encouraged to avoid. No, no. The "sensible" comment in the AARM is *not* referring to the paragraph about erroneousness of unchecked conversions. It is referring to the run-time behavior of "invalid" values, which can arise from many things, but mainly uninitialized variables. The intent is that (for example): if X = Red and X /= Red then ... should be True, despite the fact that X is not initialized (assuming the compiler fails to catch the bounded error, and raise an exception). This has nothing to do with the erroneousness defined in paragarph 12, which would have been clearer if the AARM comment were after paragraph 11, rather than after paragraph 12. - Bob