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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Examining individual bytes of an integer Date: Mon, 15 Oct 2018 21:43:57 +0300 Organization: Tidorum Ltd Message-ID: References: <9d90fa3e-f800-4086-bf97-a65474a8140a@googlegroups.com> <4ddbc9bf-0e2e-466d-8238-d8f709b985e1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net X+ajaFGiz/ufB+IgesJ5KQZqXTxniaY5WLfPR3GBNLaWA0ExoQ Cancel-Lock: sha1:Nm6Iuk9eScSsMCQdVHnnV2RRZP0= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: <4ddbc9bf-0e2e-466d-8238-d8f709b985e1@googlegroups.com> Xref: reader02.eternal-september.org comp.lang.ada:54596 Date: 2018-10-15T21:43:57+03:00 List-Id: On 18-10-15 13:18 , AdaMagica wrote: > Am Sonntag, 14. Oktober 2018 23:28:57 UTC+2 schrieb Niklas Holsti: >> Not guaranteed, but implied by the "Implementation advice": >> >> - RM 13.3(11): X'address denotes the address of the first of the >> storage elements allocated to X. >> >> - RM 13.3(14): For an array X, X'Address should point at the first >> component of the array [...]. >> >> Combining those two, it seems that the first element of an array >> should start at the first storage element (= lowest address) >> allocated to the array. >> >> By reasonable induction :-) the second, third, etc. array >> elements follow in increasing address order. But not _guaranteed_, >> I agree. > > There is the old Dewar rule that no compiler is doing nonsense. It > would be a very unfriendly compiler to not follow this advice. As I remember it, Dewar's rule says that the Ada *RM* does not specify nonsense, meaning that if some reading of the RM seems to be nonsense, it is the wrong reading. I don't remember Dewar saying anything similar about compilers. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .