CVS difference for ai12s/ai12-0232-1.txt

Differences between 1.2 and version 1.3
Log of other versions for file ai12s/ai12-0232-1.txt

--- ai12s/ai12-0232-1.txt	2017/06/10 04:24:23	1.2
+++ ai12s/ai12-0232-1.txt	2017/10/12 02:30:02	1.3
@@ -1,4 +1,4 @@
-!standard 10.2.1(9/3)                                   17-06-08  AI12-0232-1/01
+!standard 10.2.1(9/3)                                   17-10-11  AI12-0232-1/02
 !standard 10.2.1(15.6/3)
 !class binding interpretation 17-06-08
 !status work item 17-06-08
@@ -9,7 +9,8 @@
 !subject Rules for pure generic bodies
 !summary
 
-** TBD.
+The wording defining pure and preelaborable should be corrected to properly
+handle generic units that are not themselves library units.
 
 !question
 
@@ -34,8 +35,29 @@
 
 !wording
 
-** TBD.
+Modify 10.2.1(9/3):
 
+   * The creation of an object (including a component) that is
+     initialized by default, if its type does not have preelaborable
+     initialization. Similarly, the evaluation of an extension_aggregate
+     with an ancestor subtype_mark denoting a subtype of such a type[.]{;}
+
+   * The elaboration of any elaborable construct that is not preelaborable.
+
+  A generic declaration is preelaborable unless every instance would perform
+  one of the above actions.
+
+Modify 10.2.1(15.5/3):
+
+  * the elaboration of the declaration of a nonderived named
+    access-to-constant type for which the Storage_Size has been specified
+    by an expression other than a static expression with value zero[.]{;}
+
+  * the elaboration of any elaborable construct that is not pure.
+
+  A generic declaration is pure unless every instance would perform
+  one of the above actions.
+
 !discussion
 
 E-mail discussion suggests that there is a similar problem with Preelaboration.
@@ -59,6 +81,8 @@
 Then the existing generic body rule clearly applies (and any future rules on
 new kinds of entities will apply as well).
 
+The same solution is proposed for pure.
+
 ---
 
 The Ada 95 wording clearly bans variables in generic specifications. The
@@ -72,10 +96,11 @@
 
 So what do we want to do? If we really want to ensure that a pure generic unit
 can be instantiated as Pure, then we need to enforce at least some of the
-rules in a generic specification. ** The author has no idea what to do here.
+rules in a generic specification.
 
-** What fix to apply to for the original question depends on the answer to
-this question, so the author is punting.
+We have proposed to say that a generic specification is preelaborable unless
+every instance would not be, and similar, pure unless every instance would not
+be.
 
 !ASIS
 
@@ -83,7 +108,7 @@
 
 !ACATS test
 
-ACATS B-Tests ought to check that Pure (and Preelaborate?) rules are applied
+ACATS B-Tests ought to check that Pure (and Preelaborate) rules are applied
 to nested generics as required.
 
 !appendix
@@ -658,5 +683,14 @@
 
 ****************************************************************
 
+From: Tucker Taft
+Sent: Wednesday, October 11, 2017  2:48 PM
+
+Here is a proposed wording, which makes both purity and preelaborability
+recursive.  It also adds a rule that a generic declaration is preelaborable
+unless every instance would not be.  Similarly, a generic declaration is
+pure unless every instance would not be. [This is version /02 of the AI -
+Editor.]
 
+****************************************************************
 

Questions? Ask the ACAA Technical Agent