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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,18069d15345a10c8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-13 16:58:43 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!gatech!news-feed-1.peachnet.edu!news.duke.edu!eff!blanket.mitre.org!linus.mitre.org!linus!mbunix!eachus From: eachus@spectre.mitre.org (Robert I. Eachus) Newsgroups: comp.lang.ada Subject: Re: Modulus and Remainder operations (Was Re: Help with a bit of C code) Date: 13 Oct 94 16:56:29 Organization: The Mitre Corp., Bedford, MA. Message-ID: References: <1994Oct11.161048.1058@nosc.mil> <37er8t$oh0@watnews1.watson.ibm.com> <1994Oct13.181350.10997@nosc.mil> NNTP-Posting-Host: spectre.mitre.org In-reply-to: sampson@nosc.mil's message of Thu, 13 Oct 1994 18:13:50 GMT Date: 1994-10-13T16:56:29+00:00 List-Id: In article <1994Oct13.181350.10997@nosc.mil> sampson@nosc.mil (Charles H. Sampson) writes: > This discussion has caused me to reread, once again, the definition of > "erroneous execution" in LRM 1.6(7). The gist is that there are certain > Ada rules that might not be caught by a compiler/runtime and if one of > these rules is violated the effect of execution is unpredictable. The > interesting point to me is that the effect of executing a program that > relies on a particular choice of a compiler-dependent feature is also un- > predictable. Does anyone know why programs that rely on an implementation > of a compiler-dependent feature were not also classified as erroneous? Because it is the difference between undefined and not defined in this standard. The value of an (integer say) variable which has never been assigned to is undefined. The value of INTEGER'SIZE is implementation dependent. You certainly don't want to declare that any program which depends on INTEGER'SIZE is erroneous. Basically 1.1.1(16) says that the effect of executing a program which depends on implementation dependent features is one from the set of all possible legal effects. (Knowing the implementation characteristics can help you narrow that down. ;-) -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...