CVS difference for ais/ai-00002.txt

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

--- ais/ai-00002.txt	1999/09/24 03:27:03	1.4
+++ ais/ai-00002.txt	1999/10/08 23:41:04	1.5
@@ -1,4 +1,4 @@
-!standard 10.02.01 (11)                               99-08-31  AI95-00002/03
+!standard 10.02.01 (11)                               99-10-08  AI95-00002/04
 !class binding interpretation 95-06-25
 !status Corrigendum 2000 99-05-24
 !status WG9 approved 95-06-14
@@ -9,8 +9,8 @@
 
 !summary
 
-A package subunit whose parent is a preelaborated subprogram need not be
-preelaborable.
+A subunit which is not elaborated as part of elaborating a preelaborated
+library unit need not be preelaborable.
 
 !question
 
@@ -20,7 +20,7 @@
 
 !recommendation
 
-A package subunit of a preelaborated subprogram need not be preelaborable.
+(See summary.)
 
 !wording
 
@@ -30,7 +30,9 @@
 
 It is unnecessary to require a subunit of a preelaborated subprogram to
 be preelaborable, because such a subunit is not elaborated during
-elaboration of the subprogram.
+elaboration of the subprogram. This also applies to subunits of preelaborated
+tasks and any other unit which does not elaborate its contents when it is
+elaborated.
 
 Furthermore, subunits and physically nested program units should behave
 in the same way.  If a subprogram is preelaborated, packages physically
@@ -43,16 +45,37 @@
 definition of preelaborability in 10.2.1(5) says, "... unless its
 elaboration performs...", which makes the rule transitive.
 
+The proposed change to the rule makes it always the case that subunits and
+physically nested program units behave the same, even in the face of nesting
+or multiple levels of subunits.
+
 Note that the rule is irrelevant for subunits that are subprograms,
-since subprograms are always preelaborable.
+since subprograms are always preelaborable. But it is relevant for package
+and other subunits.
 
 !corrigendum 10.02.01(11)
 
-@dprepl
-All compilation units of a preelaborated library unit shall be preelaborable.
+@drepl
+If a @fa<pragma> Preelaborate (or @fa<pragma> Pure -- see below) applies to a
+library unit, then it is @i<preelaborated>. If a library unit is preelaborated,
+then its declaration, if any, and body, if any, are elaborated prior to all
+non-preelaborated @fa<library_item>s of the partition. All compilation units of a
+preelaborated library unit shall be preelaborable. In addition to the places
+where Legality Rules normally apply (see 12.3), this rule applies also in the
+private part of an instance of a generic unit. In addition, all compilation
+units of a preelaborated library unit shall depend semantically only on
+compilation units of other preelaborated library units.
 @dby
-All compilation units of a preelaborated library unit other than subunits
-of preelaborated subprogram units shall be preelaborable.
+If a @fa<pragma> Preelaborate (or @fa<pragma> Pure -- see below) applies to a
+library unit, then it is @i<preelaborated>. If a library unit is preelaborated,
+then its declaration, if any, and body, if any, are elaborated prior to all
+non-preelaborated @fa<library_item>s of the partition. The declaration and body
+of a preelaborated library unit, and all subunits that are elaborated as part of
+elaborating the library unit, shall be preelaborable. In addition to the places
+where Legality Rules normally apply (see 12.3), this rule applies also in the
+private part of an instance of a generic unit. In addition, all compilation
+units of a preelaborated library unit shall depend semantically only on
+compilation units of other preelaborated library units.
 
 !ACATS test
 
@@ -102,5 +125,18 @@
 requirement seems overly restrictive.  What we wanted to ensure
 was that the subunit depended semantically only on other
 preelaborated units.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: October 8, 1999
+
+At the recent ARG meeting, it was determined that this rule was not broad
+enough. A subunit nested in a task should also not be required to be
+preelaboratable. Similarly, a subunit of a subunit may not need to be
+preelaboratable.
+
+A rule based on equivalence of behavior of nested units and subunits was
+adopted. I've rewritten the AI to reflect this change.
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent