comp.lang.ada
 help / color / mirror / Atom feed
From: sbelmont700@gmail.com
Subject: Re: Possible GNAT problem with aliased parameters.
Date: Sun, 20 Oct 2013 17:55:16 -0700 (PDT)
Date: 2013-10-20T17:55:16-07:00	[thread overview]
Message-ID: <ed306b0b-ccf7-41c8-bad3-6eb7e0720e57@googlegroups.com> (raw)
In-Reply-To: <d743bd5f-816e-4998-b7c1-a49ea21acd62@googlegroups.com>

On Sunday, October 20, 2013 8:29:36 PM UTC-4, Shark8 wrote:

> Interesting; I _think_ the reason that the access-discriminant works is that the record itself has a deeper level than the access, thus when the record 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 declaring 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

      reply	other threads:[~2013-10-21  0:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 16:01 Possible GNAT problem with aliased parameters Shark8
2013-10-18 16:51 ` sbelmont700
2013-10-19  1:59   ` Randy Brukardt
2013-10-19  5:48     ` Shark8
2013-10-19  7:48       ` Dmitry A. Kazakov
2013-10-19 14:30       ` sbelmont700
2013-10-19 21:17         ` Shark8
2013-10-20  6:29           ` Shark8
2013-10-20 15:33             ` sbelmont700
2013-10-21  0:29               ` Shark8
2013-10-21  0:55                 ` sbelmont700 [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox