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!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.109.59.22.86.mobile.3.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Community Input for the Maintenance and Revision of the Ada Programming Language Date: Wed, 06 Sep 2017 17:57:32 +0200 Organization: JSA Research & Innovation Message-ID: <87a827akgj.fsf@jacob-sparre.dk> References: <4dc188de-802b-41ad-9cdd-b8246eb9a1c7@googlegroups.com> <47cc6474-8b75-4644-92d0-bd1f694c20e7@googlegroups.com> <338b355a-dee4-4c73-b00e-09d9a8430fb1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: franka.jacob-sparre.dk; posting-host="109.59.22.86.mobile.3.dk:109.59.22.86"; logging-data="18844"; mail-complaints-to="news@jacob-sparre.dk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:1hVcJELuUzo5If+/6q0FE22VxnE= Xref: news.eternal-september.org comp.lang.ada:47949 Date: 2017-09-06T17:57:32+02:00 List-Id: Johan Söderlind Åström wrote: > I do not think that accessing a element from a array is a complicated > thing and starting from a zero indexed array is even simpler, then why > would a compiler not guarantee such a simple thing to work? One possibility is that constrained and unconstrained subtypes of the same subtype may have slightly different memory layouts. Or maybe the bounds of the array are stored at the beginning of the memory structure (where else can we put them?), and your overlaying changes the subtype of the (possibly constant) array passed to it, by overwriting the bounds. Randy has written a part of at least one Ada compiler, so he can probably come up with some more concrete examples. Greetings, Jacob -- "Good enough for physics" -- Ridcully