CVS difference for ais/ai-00362.txt

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

--- ais/ai-00362.txt	2004/04/06 19:57:16	1.4
+++ ais/ai-00362.txt	2004/04/30 00:24:27	1.5
@@ -1,4 +1,4 @@
-!standard  03.09(06)                                   04-02-20  AI95-00362/02
+!standard  03.09(06)                                   04-04-29  AI95-00362/03
 !standard  11.04.01(02)
 !standard  11.04.01(03)
 !standard  A.03.02(02)
@@ -54,6 +54,8 @@
 Ada.Synchronous_Task_Control is declared preelaborated.
 Ada.Tags is declared preelaborated.
 Ada.Task_Identification is declared preelaborated.
+System is declared pure.
+System.Storage_Elements is declared pure.
 
 !wording
 
@@ -76,6 +78,20 @@
       type Exception_Occurrence_Access is access all Exception_Occurrence;
       Null_Occurrence : constant Exception_Occurrence;
 
+Change 13.7(3) to
+   package System is
+      pragma Pure(System);
+
+Remove the last sentence of 13.7(36). [Editor's note: This may need to be
+replaced by a pragma Remote_Types permission.]
+
+Change 13.7.1(3) to
+   package System.Storage_Elements is
+      pragma Pure(System.Storage_Elements);
+
+Remove 13.7.1(15). [Editor's note: This may need to be
+replaced by a pragma Remote_Types permission.]
+
 Change A.3.2(2) to
    package Ada.Characters.Handling is
       pragma Pure(Handling);
@@ -379,14 +395,14 @@
   Janus/Ada uses a 'built-in' implementation of this package, thus the
   categorization has no impact on the implementation.
 Ada.Task_Attributes -- C.7.2; not categorized
-  This package depends on Ada.Task_Identification and has an access type,
-  so it cannot be pure. The state is either local or in the task runtime;
-  but setting it could require copying the Initial_Value object, which is
-  not allowed for a preelaborated package.
+  This package depends on Ada.Task_Identification and has an access type (with
+  a non-empty pool), so it cannot be pure. The state is either local or in the
+  task runtime; but setting it could require copying the Initial_Value object,
+  which is not allowed for a preelaborated package.
 Ada.Task_Identification -- C.7.1; not categorized
   This package is really an interface to the tasking runtime. It has no
   state of its own. This package should not be pure, because we do not
-  want to support the use of task_ids in multiple partitions. It couldn't be
+  want to insist on support of task_ids in multiple partitions. It couldn't be
   preelaborated in Ada 95, because of the default initialized constant
   Null_Task_Id. With appropriate use of pragma Preelaborable_Initialization,
   this limitation can be eliminated. The package has no state of its own, and
@@ -409,8 +425,8 @@
   Depends on Ada.Text_IO, see the discussion of that unit.
 Ada.Unchecked_Conversion -- 13.9; Pure
 Ada.Unchecked_Deallocation -- 13.11.2; Preelaborate
-  Doesn't need to be pure because it uses a named access type, which is not
-  allowed in a Pure package.
+  Doesn't need to be pure because it only works on a non-empty storage pool,
+  which is not allowed in a Pure package.
 Ada.Wide_Text_IO -- A.11; not categorized
   This should be the same as Ada.Text_IO; see the discussion there.
 Ada.Wide_Text_IO.Complex_IO -- G.1.3; not categorized
@@ -423,28 +439,37 @@
 Interfaces.C -- B.3; Pure
 Interfaces.C.Pointers -- B.3.2; Preelaborate
   Can't be pure because it contains an access type that doesn't meet the
-  exceptions of AI-161.
+  exceptions of AI-366.
 Interfaces.C.Strings -- B.3.1; Preelaborate
   Can't be pure because it contains an access type that doesn't meet the
-  exceptions of AI-161.
+  exceptions of AI-366.
 Interfaces.COBOL -- B.4; Preelaborate
   This contains variables Ada_to_Cobol and Cobol_to_Ada in the specification.
   Thus, it cannot be pure.
 Interfaces.Fortran -- B.5; Pure
 System -- 13.7; Preelaborate
-  This can't be pure because we don't want to System.Address to be transmitted
-  between partitions.
+  Ada 95 already *allows* this to be Pure. It did not require this to be pure
+  because we did not want to require System.Address to be transmitted between
+  partitions. However, AI-366 makes these separate issues. Moreover, all of
+  the existing compiler implementers that responded reported that System was
+  already Pure in their compiler. Therefore, this package should be pure.
+  [Open issue: should we *require* this to work across partitions, or should
+  we have a *permission* for this to work across partitions.]
 System.Address_To_Access_Conversions -- 13.7.2; Preelaborate
-  Depends on System; see the description of that package.
+  Declares a named access type with a non-empty pool; thus it cannot be Pure.
 System.Machine_Code -- 13.8; unspecified
   This package's contents and thus categorization are implementation-defined.
 System.RPC -- E.5; not categorized
   It is expected that this package will need to set up the communications
   channel when it elaborates, thus it cannot be Preelaborable.
 System.Storage_Elements -- 13.7.1; Preelaborate
-  Depends on System; see the description of that package.
+  This depends on System, which we are changing the categorization of.
+  It also had a permission to be Pure in Ada 95; and it does nothing
+  that would be a problem. Thus we require that it be Pure.
 System.Storage_Pools -- 13.11; Preelaborate
-  Depends on System; see the description of that package.
+  Doesn't need to be pure because only empty storage pools are allowed in
+  Pure packages.
+
 
 !example
 
@@ -458,5 +483,14 @@
 are pure and/or preelaborable.
 
 !appendix
+
+Report on making System Pure:
+
+Taft (Sofcheck) : No problem (presuming AI-366 passes).
+Dismukes (GNAT): Already Pure.
+Cvar (OCS): Already Pure.
+Eilers (Irvine): Already Pure.
+Nielsen (DDCI): Already Pure.
+Brukardt (RRS): Categorization of built-in packages unchecked; effectively Pure.
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent