CVS difference for ais/ai-00416.txt

Differences between 1.2 and version 1.3
Log of other versions for file ais/ai-00416.txt

--- ais/ai-00416.txt	2005/03/09 00:38:02	1.2
+++ ais/ai-00416.txt	2005/03/15 01:16:10	1.3
@@ -1,4 +1,4 @@
-!standard 3.9.2(2)                                     05-02-13  AI95-00416/02
+!standard 3.9.2(2)                                     05-02-14  AI95-00416/03
 !class amendment 05-02-07
 !status work item 05-02-07
 !status received 05-02-07
@@ -231,15 +231,16 @@
 
 Add after 3.10.2(10/2):
 
-    * Within the handled_sequence_of_statements of an extended_return_statement,
-      the accessibility level of the return object is that of the
-      execution of the return_statement.  Redundant[Upon return from the
-      function, the accessibility level of the return object is
-      determined by the point of call.]
+    * 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, prior to leaving the function, the accessibility level
+      of the return object changes to be a level determined by the point
+      of call.
 
     AARM Note:
       We define the accessibility level of the return object during the
-      handled sequence of statements to be that of the return statement
+      return statement to be that of the return statement itself
       so that the object may be designated by objects local to the
       return statement, but not by objects outside the return statement.
       In addition, the intent is that the return object gets finalized
@@ -256,7 +257,7 @@
        + For an access discriminant whose value is determined by a
          discriminant_association in a subtype_indication, the
          accessibility level of the object or subprogram designated by
-         the associated value;
+         the associated value (or library level if the value is null);
 
          AARM NOTE: This deals with the following cases:
    	     - Extension aggregate where ancestor part is a subtype_mark
@@ -272,12 +273,16 @@
          where the value of the discriminant is determined by a
          component_association in the aggregate, the accessibility
          level of the object or subprogram designated by the associated
-         value;
+         value (or library level if the value is null);
 
        + For an access discriminant of an object with an unconstrained
          nominal subtype that represents part of the result of calling a
          function, the accessibility level of the function;
 
+       + For an access discriminant of an object with an unconstrained
+         nominal subtype that represents part of the result of calling a
+         function, the accessibility level of the function;
+
        + For an access discriminant of any other object with an unconstrained
          nominal subtype, the accessibility level of the object.
 
@@ -294,6 +299,21 @@
 
 Delete 3.10.2(13.2/2) (it is redundant).
 
+Change 3.10.2(14):
+
+    * The accessibility level of an object created by an allocator is
+      the same as that of the access type, except for an allocator that
+      defines the value of an access parameter or an access discriminant.
+      For an access parameter, the accessibility level is that of the
+      called function. For an access discriminant, the accessibility
+      level is determined as follows:
+         + for an allocator used to define the constraint in a subtype_declaration,
+           the level of the subtype_declaration;
+         + for an allocator used to define the discriminant of a return object,
+           the level of the master that elaborated the function body;
+         + for an allocator used to define the discriminant of any other kind of
+           object, the level of the object.
+
 Add after 4.8(5.1/2):
 
     If the designated subtype of the type of the allocator has one or
@@ -338,6 +358,12 @@
     initial expression is an aggregate (which requires build-in-place
     with no call on Adjust).
 
+    If the return statement exits without resulting in a return (e.g. due
+    to an exception propagated from the return expression or the
+    handled sequence of statements, or a goto out of the handled sequence
+    of statements), the return object is finalized prior to leaving the
+    return statement.
+
 Change 6.5(6/2):
 
     For the execution of a {simple_}return_statement, ...
@@ -376,9 +402,9 @@
      If the result subtype of a function is unconstrained and limited,
      and a call on the function is used to provide the initial value of
      an object with a constrained nominal subtype, Constraint_Error may
-     be raised at the point of the call if it is determined while
-     elaborating a return_subtype_indication or evaluating a return
-     expression within the function that the value of the result will
+     be raised at the point of the call while elaborating a
+     return_subtype_indication or evaluating a return expression within
+     the function, if it is determined that the value of the result will
      violate the constraint of this object's subtype.
 
    AARM NOTE: Without such a permission, it would be very difficult
@@ -398,21 +424,48 @@
 
      ... except in the case of a master: the execution of a body other
      than a package_body; the elaboration of a declaration other than
-     the declaration of a package {or of a type}; the execution of an
-     accept_statement, a block_statement, ...
+     the declaration of a package {or of a type}; the execution of [an
+     accept_statement, a block_statement, or a simple_statement]
+     {a statement};
 
 Add at end of 7.6.1(13/2):
-
 
-Add after 9.2(4):
+Change 9.2(2):
 
-     For task objects whose outermost enclosing object is neither a
-     declared object nor an object created by an allocator, activations
-     are initiated after completing any initialization for this
-     outermost enclosing object, prior to performing any other operation
-     on the object. For a task that is created and returned as the
-     result of a function call, activation does not occur until after
-     the function returns.
+     A task object (which represents one task) can be {a part of a
+     stand-alone object, of an object created by an allocator, or of an
+     anonymous object of a limited type} [created either as part of the
+     elaboration of an object_declaration occurring immediately within
+     some declarative region, or as part of the evaluation of an
+     allocator]. All tasks {that are part of any of the stand-alone objects}
+     created by the elaboration of object_declarations {(or
+     generic_associations of formal objects of mode IN)} of a single
+     declarative region [(including subcomponents of the declared
+     objects)] are activated together. [Similarly, all tasks created by
+     the evaluation of a single allocator are activated together. The
+     activation of a task is associated with the innermost allocator or
+     object_declaration that is responsible for its creation.] {All
+     tasks that are part of a single object that is not a stand-alone
+     object are activated together.}
+
+Change 9.2(3):
+     For {the} tasks [created by the elaboration of object_declarations] of a
+     given declarative region, the activations are initiated within the
+     context of the handled_sequence_of_statements ...
+
+Change 9.2(4):
+
+     {For tasks that are part a single object that is not a stand-alone
+     object, activations are initiated after completing any
+     initialization of the outermost object enclosing these tasks, prior
+     to performing any other operation on the outermost object. In
+     particular, for} [For] tasks {that are part of the object} created
+     by the evaluation of an allocator, the activations are initiated as
+     the last step of evaluating the allocator, [after completing any
+     initialization for the object created by the allocator, and] prior
+     to returning the new access value. {For tasks that are part of an
+     object that is the result of a function call, the activations are
+     not initiated until after the function returns.}
 
    AARM NOTE:
      The intent is that "temporary" objects with task parts are treated

Questions? Ask the ACAA Technical Agent