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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.59.5.225 with SMTP id cp1mr1332406ved.1.1382316916916; Sun, 20 Oct 2013 17:55:16 -0700 (PDT) X-Received: by 10.182.72.225 with SMTP id g1mr124521obv.7.1382316916883; Sun, 20 Oct 2013 17:55:16 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!209.85.216.88.MISMATCH!i2no24023846qav.0!news-out.google.com!9ni62895qaf.0!nntp.google.com!i2no24023833qav.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 20 Oct 2013 17:55:16 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=206.53.78.59; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy NNTP-Posting-Host: 206.53.78.59 References: <9bc1be39-4377-4df5-8686-786babc756d1@googlegroups.com> <12afac91-f0f3-4f89-ac0f-a61aaf7b8d4b@googlegroups.com> <0bb058fa-df1b-4092-a6f9-47d12a5f5791@googlegroups.com> <28e86e6c-f2e1-4cca-abce-cd6f73447f4d@googlegroups.com> <2f2f46da-e6c2-4e0c-a5d2-3859975b67c9@googlegroups.com> <7ce0c2bc-7720-4a90-a31e-e723a9e47d4b@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Possible GNAT problem with aliased parameters. From: sbelmont700@gmail.com Injection-Date: Mon, 21 Oct 2013 00:55:16 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:17488 Date: 2013-10-20T17:55:16-07:00 List-Id: On Sunday, October 20, 2013 8:29:36 PM UTC-4, Shark8 wrote: > Interesting; I _think_ the reason that the access-discriminant works is t= hat the record itself has a deeper level than the access, thus when the rec= ord leaves scope the access may or may not be viable: the access could have= the same scope as the record, or the record nested inside the scope declar= ing the access. FWIT, there is a run-time check to be aware of when returning objects with = access discriminants in this way, for instance if the aliased parameter is = on the heap but the return object is not. -sb