From: Hibou57 (Yannick Duchêne) on
Tipo error :

Read

procedure G is
-- Variation from F : the protected
-- type is wrapped in a limited record
-- which handles the derivation of
-- the Limited_Type.

Instead of

procedure G is
-- Variation from G : the protected
-- type is wrapped in a limited record
-- which is handle the derivation of
-- the Limited_Type.
From: Hibou57 (Yannick Duchêne) on
On 11 fév, 16:16, Robert A Duff <bobd...(a)shell01.TheWorld.com> wrote:
> I'm not going to read your code carefully, but that doesn't
> seem right.  If you have:
>
>     X : T := F(...);
>
> the result of F is "built in place" in X, and should be finalized
> when the procedure containing X is left.
the result of F is "built in place" in X : Yes, that's what I was
expecting too !
And should be finalized when the procedure containing X is left : the
same !
So you confirmed my expectations.
Try the Test program, and you will see this things are not going this
way with it.
Things works nice with G.
From: Hibou57 (Yannick Duchêne) on
On 11 fév, 18:40, Adam Beneschan <a...(a)irvine.com> wrote:
> Yes, I believe that's right, and it's spelled out clearly in the RM,
> in sections 7.6(17.1/3-17.11/3 and especially 17.7/3), 6.5(5.8/3),
> 6.5(23/2), 7.6(4), and 3.10.2(10.1/2).
With the exception of 6.5(23/2), none of these references exists in my
annotated RM. Was this a joke ?

From: Hibou57 (Yannick Duchêne) on
On 11 fév, 18:40, Adam Beneschan <a...(a)irvine.com> wrote:
> But more simply, as I understand it: (1) When you have an extended
> return, the return object is used as the anonymous object that holds
> the function result at the point of the function call, so it's not
> finalized until the caller is done with the anonymous object; and (2)
> when the object is built in place, the anonymous object "mutates into"
> the new object and is not finalized (7.6(17.7/3)).  So yes, no
> finalization should be done until X goes out of scope.
>
>                                      -- Adam


So yes, no finalization should be done until X goes out of scope :
second confirmation.
From: Hibou57 (Yannick Duchêne) on
On 11 fév, 22:51, Adam Beneschan <a...(a)irvine.com> wrote:
> point of the nasty language in 3.10.2(10.1).  Which is another way of

[ARM 3.10.2(10.1/2)]
> Within a return statement, the accessibility level of the return
> object is that of the execution of the return statement. If the
> return statement completes normally by returning from the function,
> then prior to leaving the function, the accessibility level of the
> return object changes to be a level determined by the point of call,
> as does the level of any coextensions (see below) of the return
> object.

I don't feel it's so nasty (seems logic and coherent to me). But it's
about “ Operations of Access Types ” (3.10.2), not limited type (while
there are some similarities in some way).