comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: [Q] non-limited record and "self-pointer"
Date: Tue, 10 Feb 2004 02:20:06 -0500
Date: 2004-02-10T02:20:06-05:00	[thread overview]
Message-ID: <jvqdnTsRj_S6G7XdRVn-sQ@comcast.com> (raw)
In-Reply-To: <mailman.10.1076380259.295.comp.lang.ada@ada-france.org>

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 there is a big bug here that should be fixed in Ada 0Y.  If 
parameters of a type are aliased, it doesn't make any sense to require 
users to declare objects of the type as explicitly aliased.  But that's 
the way it currently is, and I have some code now that has aliased in 
object declarations all over the place.  I also feel the same way about 
objects with aliased components.  Is there really any benefit to not 
making objects of a type with aliased components always aliased?


-- 
                                           Robert I. Eachus

"The war on terror is a different kind of war, waged capture by capture, 
cell by cell, and victory by victory. Our security is assured by our 
perseverance and by our sure belief in the success of liberty." -- 
George W. Bush




  reply	other threads:[~2004-02-10  7:20 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 [this message]
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
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