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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c08a7609345f4e5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!goblin1!goblin2!goblin.stu.neva.ru!news.net.uni-c.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Newsgroups: comp.lang.ada Subject: Re: Limited use for limited with? References: <853314bc-0f79-435f-86a5-d7bcdd610731@c10g2000yqh.googlegroups.com> <82y6ajg07m.fsf@stephe-leake.org> <82ocb6ushq.fsf@stephe-leake.org> Date: Sat, 09 Oct 2010 08:21:39 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Martin Krischik" Organization: Martin Krischik, Softwareentwicklung Message-ID: User-Agent: Opera Mail/10.62 (MacIntel) NNTP-Posting-Host: 89.236.173.3 X-Trace: news.sunsite.dk DXC=kmHo\l9f^2cj?5fOS\LBAnYSB=nbEKnkk4d83VQloLloS5daR30PdPeV:_8RJBabHm?QA2cYN[o4a;jTD2oe@YkdRDQR1a026>b X-Complaints-To: staff@sunsite.dk Xref: g2news1.google.com comp.lang.ada:14457 Date: 2010-10-09T08:21:39+02:00 List-Id: Am 08.10.2010, 02:07 Uhr, schrieb Randy Brukardt : > "Martin Krischik" wrote in message > news:op.vj7xjle3z25lew@macpro-eth1.krischik.com... > ... >>> Inside Foo_Two, we know that the accessibility level of A is the same >>> as >>> the declaration of My_Access_Type, >> >> Are you realy sure about that? My_Access_Type is an access *all* and >> could >> point to an aliased value on the stack. > > He is. If you try to store an access to an aliased value on the stack > into > My_Access_Type, you'll get a compile-time error that the accessibility > fails. (Or, in a few obscure cases, Program_Error will be raised.) The > rules > that guarentee this are a constant source of headaches for the ARG and > implementers, but Ada users don't need to worry about that. But if you mention Program_Error then the accessibility can not be checked at compile time in all circumstances. In which case an access all is not at all better then an anonymous access. Only a plain access will guarantee that accessibility can be checked statically in all circumstances. Regards. Martin -- Martin Krischik mailto://krischik@users.sourceforge.net https://sourceforge.net/users/krischik