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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f494beedc5085953 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!d1g2000hsg.googlegroups.com!not-for-mail From: george.priv@gmail.com Newsgroups: comp.lang.ada Subject: Re: Obtaining access to protected object Date: Wed, 9 Jul 2008 19:10:39 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <72741a06-d96c-4f53-a80b-3595c513efa1@27g2000hsf.googlegroups.com> <59ed2f49-92e7-4d9d-b88e-5fbd28824d91@p25g2000hsf.googlegroups.com> NNTP-Posting-Host: 151.196.71.114 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1215655839 5108 127.0.0.1 (10 Jul 2008 02:10:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 10 Jul 2008 02:10:39 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d1g2000hsg.googlegroups.com; posting-host=151.196.71.114; posting-account=VnNb3AoAAACTpRtCcTrcjmPX7cs92k1Q User-Agent: G2/1.0 X-HTTP-Via: 1.1 SPARKS X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:1072 Date: 2008-07-09T19:10:39-07:00 List-Id: On Jul 9, 3:27 pm, Adam Beneschan wrote: > On Jul 9, 8:33 am, george.p...@gmail.com wrote: > > > The instance may not be aliased, and type itself is not enough to > > determine that at compile time. > > Wrong. The current instance of a protected type is always considered > aliased, and 'Access is allowed. 3.10(9/2). > > -- Adam I may be wrong, but it seems that Aliaseness is guaranteed only within the protected body. So taking pointer and spilling it outside of the scope (even if allowed) is bad idea IMHO. If used inside the protected body then what's advantage of using pointer vs. referring directly? George