CVS difference for ais/ai-00403.txt

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

--- ais/ai-00403.txt	2005/01/28 00:21:34	1.1
+++ ais/ai-00403.txt	2005/03/18 01:52:26	1.2
@@ -1,5 +1,7 @@
-!standard 10.2.1(11)                                   05-01-27  AI95-00403/01
+!standard 10.2.1(11)                                   05-03-15  AI95-00403/02
 !class binding interpretation 05-01-27
+!status Amendment 200Y 05-03-17
+!comment This AI is in the Amendment, but is not yet approved.
 !status work item 05-01-27
 !status received 05-01-27
 !qualifier omission
@@ -40,18 +42,35 @@
 Add the following to 10.2.1(10):
 
 A generic body is preelaborable only if elaboration of a corresponding instance
-body would not perform any such actions, presuming that the actual for each
-formal private type (or extension) is a private type (or extension), {the
-actual for each formal object is nonstatic, }and the
-actual for each formal subprogram is a user-defined subprogram.
+body would not perform any such actions, presuming that:
 
+o  the actual for each formal private type (or extension) declared within the
+formal part of the generic unit is a private type (or extension) that does not
+have preelaborable initialization;
+
+o  the actual for each formal type is nonstatic;
+
+o  the actual for each formal object is nonstatic; and
+
+o  the actual for each formal subprogram is a user-defined subprogram.
+
+AARM Note: This is an "assume-the-worst" rule. The elaboration of a generic unit
+doesn't perform any of the actions listed above, because its sole effect is to
+establish that the generic can from now on be instantiated. So the elaboration
+of the generic itself is not the interesting part when it comes to
+preelaboration rule. The interesting part is what happens when you elaborate
+"any instantiation" of the generic. For instance, declaring an object of a
+limited formal private type might well start tasks, call functions, and do all
+sorts of non-preelaborable things. We prevent these situations by assuming that
+the actual parameters are as badly behaved as possible.
 
 !discussion
 
 10.2.1(10) is intended to be an "assume-the-worst" rule. However, it explicitly
 requires assuming properties that have that effect for types and subprograms;
 objects aren't mentioned. Objects should be assumed to be non-static, because
-then 10.2.1(8) must apply.
+then 10.2.1(8) must apply. We must also specify that the private type used when
+assuming the worst doesn't have preelaborable initialization.
 
 !corrigendum 10.2.1(10)
 
@@ -62,10 +81,18 @@
 actual for each formal subprogram is a user-defined subprogram.
 @dby
 A generic body is preelaborable only if elaboration of a corresponding instance
-body would not perform any such actions, presuming that the actual for each
-formal private type (or extension) is a private type (or extension), the
-actual for each formal object is nonstatic, and the
-actual for each formal subprogram is a user-defined subprogram.
+body would not perform any such actions, presuming that:
+
+@xbullet<the actual for each formal private type (or extension) declared within
+the formal part of the generic unit is a private type (or extension) that does
+not have preelaborable initialization;>
+
+@xbullet<the actual for each formal type is nonstatic;>
+
+@xbullet<the actual for each formal object is nonstatic; and>
+
+@xbullet<the actual for each formal subprogram is a user-defined subprogram.>
+
 
 !ACATS Test
 

Questions? Ask the ACAA Technical Agent