From: Stephen Leake <stephen_leake@acm.org>
To: comp.lang.ada@ada-france.org
Subject: Re: [Q] non-limited record and "self-pointer"
Date: 08 Feb 2004 19:58:00 -0500
Date: 2004-02-08T19:58:00-05:00 [thread overview]
Message-ID: <mailman.7.1076288309.295.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <86d68pl0tc.fsf@sonnenregen.at.home>
Georg Bauhaus <sb463ba@uni-duisburg.de> writes:
> Is there any circumstance which might allow the following type
> (Read_Only_Set) to be o.K.? The record isn't limited, the compiler
> does not complain unless I remove the "container" component. It says
> then that for correct instantiation the current instance must be a
> limited type. Which has some words that I had thought it could say.
I'm not clear what you are asking.
The prefix of 'Access or 'Unchecked_Access must be aliased. ARM 3.10
(9) says the current instance of a limited type is aliased. Sor for
'Unchecked_Access to be legal, Read_Only_Set must be limited.
Apparently the compiler thinks including teh Container component makes
Read_Only_Set limited. But in the version of Charles I have,
Charles.Sets.Sorted.Unbounded.Container_Type is not limited. So that's
a puzzle. What does your version of Charles say?
> package Implementation is
> new Charles.Sets.Sorted.Unbounded(Element);
> -- (Element is generic formal private)
>
> type Read_Only_Set is tagged <-- not limited
> record
> container: Implementation.Container_Type;
>
> -- line 102:
> self: Set_Ptr := Read_Only_Set'unchecked_access; <-- no complaints
> -- used in value_in_place
--
-- Stephe
next prev parent reply other threads:[~2004-02-09 0:58 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 [this message]
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
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