CVS difference for ai05s/ai05-0284-1.txt

Differences between 1.2 and version 1.3
Log of other versions for file ai05s/ai05-0284-1.txt

--- ai05s/ai05-0284-1.txt	2012/01/05 06:19:33	1.2
+++ ai05s/ai05-0284-1.txt	2012/03/10 06:25:15	1.3
@@ -1,5 +1,7 @@
-!standard 3.10.2(10.6/2)                                 12-01-04  AI05-0284-1/01
+!standard 3.10.2(10/2)                                  12-03-09  AI05-0284-1/02
 !class binding interpretation 11-11-13
+!status Amendment 2012 12-03-09
+!status ARG Approved 9-0-1  12-02-25
 !status work item 11-11-13
 !status received 11-08-07
 !priority Low
@@ -8,6 +10,8 @@
 !subject Accessibility of anonymous access returns
 !summary
 
+The accessibility level of the type of the result of a function call
+to a function with an anonymous access result is determined by the point of call.
 
 !question
 
@@ -18,12 +22,13 @@
       function Bad return access Some_Type is
          Local : aliased Some_Type;
       begin
-         return Local'Access; -- Should this be illegal?
+         return Local'Access; -- Should this be illegal? (Yes, it is.)
       end Bad;
 
 The above appears to require a runtime check raising Program_Error, as there is
 no static level defined for the return object and thus we cannot apply
-3.10.2(28/3). Only 3.10.2(29) can apply. Should this be changed?? (Dunno.)
+3.10.2(28/3). Only 3.10.2(29) can apply. Should this be changed?? (No, it's already
+covered.)
 
 (2) While 3.10.2 defines the accessibility level of an object of an anonymous
 access function return, it does not define the accessibility level of the
@@ -37,10 +42,9 @@
 
 !wording
 
-** TBD for (1).
+For (2), add a paragraph indented the same as 3.10.2(10.1/3) [but not bulleted]
+before 3.10.2(10.7/3): [This is part of the rule represented by 3.10.2(10.1/3).]
 
-For (2), add a top-level bulleted before 3.10.2(10.7/3):
-
    In the case of a call to a function whose result type is an anonymous
    access type, the accessibility level of the type of the result of
    the function call is also determined by the point of call as described
@@ -48,21 +52,17 @@
 
 !discussion
 
-Editor's ramblings: For (1), there doesn't seem to be any necessity of a static
-rule (although it might cause implementation difficulties as outlined in
-AI12-0016-1). But at least conceptually, the check is always possible at
-runtime. I suspect that the static rule was omitted thinking that this is
-similar for access parameters (which have no static rule), but the example in
-the question shows this is not true. If we do adopt a static rule, it had better
-allow the examples given in the !example section.
-
-For (2), Steve points out that there is only one reasonable interpretation that
-makes sense. But the wording doesn't support that interpretation directly. Thus
-we ought to fix the wording.
+For (1), 3.10.2(19.3/3) defines the statically deeper relationship for an anonymous
+access in a return statement. So we have the needed rule, nothing additional is
+needed.
+
+For (2), there is only one reasonable interpretation that makes sense. But the
+wording doesn't support that interpretation directly. Thus we ought to fix the
+wording.
 
 !example
 
-For question 1, any rule that we adopt should not make the following illegal:
+For question 1, the following is legal:
 
       type Named is access all Some_Type;
       Ptr : Named;
@@ -108,6 +108,17 @@
     Nested;
   end Test;
 
+!corrigendum 3.10.2(10/2)
+
+@drepl
+@xbullet<The accessibility level of an @fa<aggregate> or the result of a
+function call (or equivalent use of an operator) that is used (in its entirety)
+to directly initialize part of an object is that of the object being
+initialized. In other contexts, the accessibility level of an @fa<aggregate> or
+the result of a function call is that of the innermost master that evaluates
+the @fa<aggregate> or function call.>
+@dby
+@Comment{See the conflict file for the real wording}
 
 !ACATS Test
 

Questions? Ask the ACAA Technical Agent