comp.lang.ada
 help / color / mirror / Atom feed
From: adam@irvine.com (Adam Beneschan)
Subject: Re: [Q] non-limited record and "self-pointer"
Date: 13 Feb 2004 16:24:14 -0800
Date: 2004-02-13T16:24:14-08:00	[thread overview]
Message-ID: <b4682ab7.0402131624.45fbc352@posting.google.com> (raw)
In-Reply-To: jvqdnTsRj_S6G7XdRVn-sQ@comcast.com

"Robert I. Eachus" <rieachus@comcast.net> wrote in message news:<jvqdnTsRj_S6G7XdRVn-sQ@comcast.com>...
> Stephen Leake wrote:
> 
> 
> > This definitely looks like a compiler bug. Perhaps because Container
> > is tagged, Read_Only_Set is being labeled "aliased". But that's not in
> > the ARM.
> 
> I don't see that.  3.10(9) says in part: "Finally, the current instance 
> of a limited type, and a formal parameter or generic formal object of a 
> tagged type are defined to be aliased."
> 
> Note that this applies to parameters, not to objects.  So a type 
> definition can include a self reference as in the example, and the 
> compiler should only object if you declare an object of the type that is 
> not aliased.

However, the AARM says:

   "Ramification: The current instance of a nonlimited type is not
aliased."

It doesn't say "The current instance of a nonlimited type is either
aliased or not aliased depending on whether an object of that type is
aliased or not".  So that would indicate to me, at least according to
the AARM (which I realize is not part of the standard but may indicate
how the standard is intended to be interpreted, maybe), that the type
declaration is illegal.

See also AI95-00225 (Amendment 200Y), which uses the term "if and only
if" to make it clear that the current instance is not aliased and thus
'Access and 'Unchecked_Access cannot be used on it.

                                 -- Adam



  parent reply	other threads:[~2004-02-14  0:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-08 21:26 [Q] non-limited record and "self-pointer" Georg Bauhaus
2004-02-09  0:58 ` Stephen Leake
2004-02-09  2:56   ` Georg Bauhaus
2004-02-09 12:50     ` Stephen Leake
2004-02-09 15:45       ` Georg Bauhaus
2004-02-10  1:35         ` Dan Eilers
2004-02-10  2:30           ` Stephen Leake
2004-02-10  7:20             ` Robert I. Eachus
2004-02-11 18:41               ` Georg Bauhaus
2004-02-11 22:05                 ` Randy Brukardt
2004-02-12  0:21                 ` Robert I. Eachus
2004-02-12 20:44                   ` Georg Bauhaus
2004-02-14  0:25                     ` Robert I. Eachus
2004-02-14  4:09                       ` Robert I. Eachus
2004-02-14  0:24               ` Adam Beneschan [this message]
2004-02-14  6:04                 ` Randy Brukardt
replies disabled

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