CVS difference for ai05s/ai05-0234-1.txt
--- ai05s/ai05-0234-1.txt 2011/03/17 07:23:16 1.11
+++ ai05s/ai05-0234-1.txt 2011/04/30 07:28:36 1.12
@@ -1,4 +1,4 @@
-!standard 6.5(21/3) 11-03-17 AI05-0234-1/05
+!standard 6.5(21/3) 11-04-07 AI05-0234-1/06
!class binding interpretation 10-11-15
!status work item 10-11-15
!status received 10-10-31
@@ -111,29 +111,30 @@
Add the following after 3.10.2(10/2) (Note: '*' denotes a top-level bullet
and '+' denotes second-level bullets):
- * The accessibility level of the result of a function call is "determined by
- the point of call" as follows:
+ * The accessibility level of the result of a function call is
+ that of the "master of the function call", which
+ is determined by the point of call as follows:
+ If the result is used (in its entirety) to directly initialize part of an
- object, the accessibility level is that of the object being initialized.
+ object, the master is that of the object being initialized.
In the case where the initialized object is a coextension that becomes
- a coextension of another object (see below), the accessibility level is
- the level of the eventual object to which the coextension will be
+ a coextension of another object (see below), the master is
+ that of the eventual object to which the coextension will be
transferred.
+ If the result is of an anonymous access type and is the operand of an
- explicit conversion, the accessibility level is that of the target type
+ explicit conversion, the master is that of the target type
of the conversion;
+ If the result is of an anonymous access type and defines an access
- discriminant, the accessibility level is the same as that for an object
+ discriminant, the master is the same as that for an object
created by an anonymous allocator that defines an access discriminant
(even if the access result is of an access-to-subprogram type).
+ If the call itself defines the result of a function to which one of
the above rules applies, these rules are applied recursively;
- + In other cases, the accessibility level of the result is that of the
+ + In other cases, the master of the call is that of the
innermost master that evaluates the function call.
[AARM] Ramification: The accessibility level of a function result object
@@ -144,8 +145,8 @@
[AARM] Implementation Note: There are several cases where the implementation
may have to pass in the accessibility level of the result object on a call,
- to support later rules where the accessibility level is said to be determined
- by the point of call:
+ to support later rules where the accessibility level comes from the master
+ of the call.
* when the function result may have a part with access discriminants;
@@ -173,11 +174,13 @@
of a limited type with defaulted access discriminants.
-Modify 3.10.2(14.5/3) (added as part of AI05-0051-1) as follows, deleting all
-but the first sentence (deleted parts are addressed above as new bullets):
+Modify 3.10.2(14.5/3) (added as part of AI05-0051-1) as follows, modifying the
+first sentence, and deleting the rest (deleted parts are addressed above as new
+bullets):
* Within a return statement, the accessibility level of the anonymous access
- type of an access result is determined by the point of call. [If the call is
+ type of an access result is [determined by the point of call]
+ {that of the master of the call}. [If the call is
the operand of an explicit type conversion, the accessibility level is that
of the target access type of the conversion. If the call is an actual
parameter of another call or the prefix of a name, the accessibility level
@@ -188,6 +191,16 @@
itself defines the result of a function with an access result, this rule
is applied recursively.]
+Modify 3.10.2(19.1/3) (added as part of AI05-0051-1) as follows:
+
+ * For determining whether a level is statically deeper than the
+ level of the anonymous access type of an access result of a function,
+ when within a return statement that applies to the function, the
+ level [determined by the point of call]
+ {of the master of the call} is presumed to be the same
+ as that of the level of the master that elaborated the function
+ body.
+
Modify 4.8(10.1/3) (as modified by AI05-0051-1) as follows:
For any allocator, if the designated type of the allocator is class-wide,
@@ -206,8 +219,8 @@
* {AI05-0142-4} In a function call, for each explicitly aliased parameter,
a check is made that the accessibility level of the master of the actual
- object is not deeper than that [of the master of the function result]
- {determined by the point of call (see 3.10.2)}.
+ object is not deeper than that of the master of the [function result]
+ {call (see 3.10.2)}.
Modify 6.5(21/3) (as modified by AI05-0051-1) as follows:
@@ -217,8 +230,9 @@
a check is made that the accessibility level of the anonymous access type
of each access discriminant, as determined by the expression or the
return_subtype_indication [of the function] {of the return statement},
- is not deeper than the level of the return object as determined by the
- point of call (see 3.10.2). If this check fails, Program_Error is raised.
+ is not deeper than the level of the [return object as determined by the
+ point of]{master of the} call (see 3.10.2). If this check fails,
+ Program_Error is raised.
Add the following AARM implementation note after 6.5(21/3):
@@ -397,14 +411,17 @@
-- raises Program_Error after calling Foo.
end F;
-The main set of wording changes in this AI is formalizing the definition
-in 3.10.2 of the term "determined by the point of call", which was already
-used in 3.10.2(10.1/2), and several additional uses were added by the changes
-of AI05-0051. We also made changes to the check done for allocators to
-ensure that the check is done if any part of the object's subtype has
-an access discriminant, to check explicitly aliased parameters based on
-the level determined at the point of call, and to define the accessibility
-level of the access type associated with defaulted access discriminants.
+The main wording change in this AI is formalizing the definition in 3.10.2 of
+the term "master of a function call" (as determined by the point of call). The
+term "determined by the point of call" was already used in 3.10.2(10.1/2), and
+several additional uses were added by the changes of AI05-0051. These are
+changed to use the new term "master of the call".
+
+We also made changes to the check done for allocators to ensure that the
+check is done if any part of the object's subtype has an access
+discriminant, to check explicitly aliased parameters based on the master
+of the call, and to define the accessibility level of the access type
+associated with defaulted access discriminants.
!example
@@ -2329,6 +2346,32 @@
BTW, I just noticed that I accidentally left in two sets of "???" surrounding a
rule I added related to coextensions. They may be appropriate given the subject
matter, but feel free to remove them.
+
+****************************************************************
+
+From: Bob Duff
+Sent: Thursday, April 07, 2011 6:08 PM
+
+New version of AI05-0234-1, Hole in AI05-0051-1.
+based on the April 7, 2011 phone meeting. [This is version /06 of the AI - Editor.]
+
+The main thing was to change:
+
+ * The accessibility level of the result of a function call is "determined by
+ the point of call" as follows:
+
+to:
+
+ * The accessibility level of the result of a function call is
+ that of the "master of the function call", which
+ is determined by the point of call as follows:
+
+Then I changed all the places in the this AI, AI05-0051-1, and the AARM
+that use the "point of" wording to use the new "master of call"
+term.
+
+The purpose of this is to allow AI05-0190-1, Global storage pool
+controls, to use this term.
****************************************************************
Questions? Ask the ACAA Technical Agent