CVS difference for ais/ai-00373.txt

Differences between 1.4 and version 1.5
Log of other versions for file ais/ai-00373.txt

--- ais/ai-00373.txt	2004/06/10 05:48:26	1.4
+++ ais/ai-00373.txt	2004/08/31 23:06:21	1.5
@@ -1,4 +1,4 @@
-!standard 03.03.01(20)                                 04-06-08  AI95-00373/02
+!standard 03.03.01(20)                                 04-08-31  AI95-00373/03
 !class binding interpretation 04-02-05
 !status work item 04-06-07
 !status received 04-01-17
@@ -27,6 +27,13 @@
 
 !wording
 
+Insert after 3.3.1(8):
+
+  A component of an object is said to *require late initialization*
+  if it has an access discriminant value constrained by a per-object
+  expression, or if it has an initialization expression which includes a name
+  denoting the current instance of the type or denoting an access discriminant.
+
 Replace 3.3.1(18/1 - 20) with
 
   3. The object is created, and, if there is not an initialization expression,
@@ -45,17 +52,13 @@
       - The evaluation of the default_expression for any component that
         depends on a discriminant is preceded by the assignment to that
         discriminant.
-
-  Furthermore, a component of an object is said to *require late initialization*
-  if it has an access discriminant value constrained by a per-object
-  expression, or if it has an initialization expression which includes a name
-  denoting the current instance of the type or denoting an access discriminant.
-  For the third step above, the assignments to any components not requiring
-  late initialization must precede the initial value evaluations for any
-  components requiring late initialization; if two components both require late
-  initialization, then the assignment to the component occurring earlier
-  in the order of the component declarations must precede the initial value
-  evaluation of the component occurring later.
+      - the assignments to any components, including implicit components,
+        not requiring late initialization must precede the initial value
+        evaluations for any components requiring late initialization; if two
+        components both require late initialization, then assignments to parts
+        of the component occurring earlier in the order of the component
+        declarations must precede the initial value evaluations of the
+        component occurring later.
 
 !example
 
@@ -132,23 +135,23 @@
 2) The reference to "the order of the component declarations" is intended to
    echo 7.6(12).
 
-3) Given this example
+3) Consider:
     type T (D : Some_Discrete_Type) is
       limited record
         F1 : T1 (T'Access);
         F2 : T2 (D) ;
         F3 : T3 := F (D);
       end record;
-   , F2 and F3 do not "require late initialization".
+   Here, F2 and F3 do not "require late initialization".
    We want F1 initialized last in this case. Evaluation of a scalar
    discriminant does not cause a component to "require late initialization".
 
-4) Given this example
+4) Consider:
     type Tt (Dd : Some_Type := Some_Value) is
       record
         Ff : Some_Type := Dd;
       end record;
-   , the current wording of  3.3.1(20) allows the following (bad) order:
+   The Ada 95 Standard wording of 3.3.1(20) allows the following (bad) order:
        a) Evaluate the initial value of the Dd component.
        b) Evaluate the initial value of the Ff component.
        c) Assign the value computed in step #1 to the Dd component.
@@ -162,10 +165,13 @@
    because 3.3.1(15) explicitly states that the steps are to be performed
    sequentially.
 
-6) Should it be stated explicitly that the evaluation-before-initialization
-   cases that this proposal does not prevent (i.e. cases involving two or more
-   components which require late finalization) result in erroneous execution?
-   Would an AARM note be appropriate?
+6) It does not need to be stated explicitly that the
+   evaluation-before-initialization cases that this proposal does not prevent
+   (i.e. cases involving two or more components which require late finalization)
+   result in erroneous execution. This is already a consequence of existing
+   rules (13.9.1(8) and the first sentence of 13.9.1(4), particularly the
+   clause "and any explicit or default initializations have been performed").
+   Still, an AARM note might be appropriate.
 
 --!corrigendum
 

Questions? Ask the ACAA Technical Agent