CVS difference for ai12s/ai12-0003-1.txt
--- ai12s/ai12-0003-1.txt 2015/01/29 03:52:23 1.14
+++ ai12s/ai12-0003-1.txt 2015/01/29 05:06:07 1.15
@@ -1,11 +1,13 @@
-!standard 8.2(11) 15-01-28 AI12-0003-1/08
+!standard 8.2(11) 15-01-29 AI12-0003-1/09
!standard 13.11.3(3.1/3)
!standard 13.11.3(4.1/3)
!standard 13.11.3(4.2/3)
!standard 13.11.3(5/3)
!standard 13.11.3(6.2/3)
!standard 13.11.3(6.3/3)
-!class Amendment 11-06-19
+!class binding interpretation 15-01-28
+!status Corrigendum 2015 15-01-28
+!status ARG Approved 8-0-1 15-01-28
!status work item 11-06-19
!status received 11-03-21
!priority Low
@@ -16,22 +18,19 @@
The standard storage pool can be specified in a Default_Storage_Pool
pragma or aspect.
-!problem
+!question
If a programmer wants to specify the default storage pool as NULL through a
configuration pragma, then how would one provide a user defined storage pool
-that does allocate a block of memory from the heap?
+that does allocate a block of memory from the heap (aka the Standard storage
+pool as described in 13.11)? (Use storage_pool_indicator Standard.)
-!proposal
+!recommendation
Add a new argument to the Default_Storage_Pool pragma to achieve the
effect of returning to the "standard" allocation method used by the
implementation, usually the use of a general heap.
-[Editor's note: With this approach, this AI could be reclassified as a
-Binding Interpretation. Thus allowing the capability to be used
-immediately.]
-
!wording
Append after 8.2(11) (i.e., as a new paragraph at the end of
@@ -40,8 +39,7 @@
The immediate scope of a pragma which is not used
as a configuration pragma is defined to be the
region extending from immediately after the pragma
- to end of the pragma's nearest enclosing declarative
- region.
+ to end of the the declarative region immediately enclosing the pragma.
Modify 13.11.3(3.1/3):
@@ -78,10 +76,6 @@
visible at the point of the pragma, other than package Standard
itself.
-AARM Ramification: The standard storage pool is not an object of the
- Standard package and is not restricted to having
- Preelaborable_Initialization.
-
AARM Reason: The Standard storage_pool_indicator does not resolve to the package
Standard as it is an identifier specific to a pragma. Resolving to package
Standard would imply that the standard pool is an object declared in that
@@ -90,6 +84,13 @@
implementers to implement the standard storage pool with
Preelaborable_Initialization, which is an unnecessary restriction.
+ No declaration of Standard can ever be use-visible, as the language-defined
+ non-overloadable definition of Standard will hide any use-visible declarations.
+ Thus we need only concern ourselves with immediately visible declarations
+ with the defining identifier Standard; that eliminates any possible
+ confusion.
+End AARM Reason.
+
Modify 13.11.3(5/3):
The language-defined aspect Default_Storage_Pool may be specified for a
@@ -102,6 +103,13 @@
generic unit; if the aspect is not specified, the default pool of the
instance is that defined for the generic unit.
+ Standard when used aspect_definition for the Default_Storage_Pool aspect is
+ an identifier specific to an aspect (see 13.1.1) and does not denote any
+ declaration. If the aspect_definition for the Default_Storage_Pool aspect
+ is Standard, then there shall not be a declaration with defining identifier
+ Standard that is immediately visible at the point of the aspect, other than
+ package Standard itself.
+
Modify 13.11.3(6.2/3):
If the default pool is {neither} [non]null {nor Standard}, the Storage_Pool
@@ -109,8 +117,8 @@
Modify 13.11.3(6.3/3):
- Otherwise {(including when the default pool is specified as Standard)}[,
- there is no default pool;] the standard storage pool is used for the type as
+ Otherwise {(including when the default pool is specified as Standard)},
+ [there is no default pool;] the standard storage pool is used for the type as
described in 13.11.
!discussion
@@ -127,21 +135,110 @@
Extending the Default_Storage_Pool pragma to allow it to cause the
implementation to revert to the standard allocation method seemed best
to achieve the desired capability.
+
+!corrigendum 8.2(11)
+
+@dinsa
+The immediate scope of a declaration is also the immediate scope of the entity
+or view declared by the declaration. Similarly, the scope of a declaration
+is also the scope of the entity or view declared by the declaration.
+@dinst
+The immediate scope of a pragma which is not used
+as a configuration pragma is defined to be the
+region extending from immediately after the pragma
+to end of the declarative region immediately enclosing the pragma.
+
+!corrigendum 13.11.3(3.1/3)
+
+@drepl
+@xindent<@fa<storage_pool_indicator> ::= @i<storage_pool_>@fa<name> | @b<null>>
+@dby
+@xindent<@fa<storage_pool_indicator> ::= @i<storage_pool_>@fa<name> | @b<null> | @fa<identifier>>
+
+Modify 13.11.3(3.1/3):
+
+ storage_pool_indicator ::= storage_pool_name | null {| Standard}
+
+Modify 13.11.3 (4.1/3):
+
+ If the pragma is used as a configuration pragma, the storage_pool_indicator
+ shall be {either} null {or Standard}, and it defines the default pool to be
+ {respectively} null {or Standard} within all applicable compilation units
+ (see 10.1.5), except within the immediate scope of another pragma
+ Default_Storage_Pool. Otherwise, [the pragma occurs immediately within a
+ sequence of declarations, and] it defines the default pool within the
+ immediate scope of the pragma to be either null{, Standard,} or the pool
+ denoted by the storage_pool_name, except within the immediate scope of a
+ later pragma Default_Storage_Pool. Redundant [Thus, an inner pragma overrides
+ an outer one.]
+
+Add after 13.11.3 (4.1/3):
+
+ Except within the immediate scope of a later Default_Storage_Pool pragma, the
+ Standard storage_pool_indicator causes the storage pool of any access type to
+ be the standard storage pool as described in 13.11.
+
+<<< AI Note: the wording carefully ties into 13.11, so that it works for
+instances. >>>>
+
+Add after 13.11.3(4.2/3):
+
+ The Standard storage_pool_indicator is an identifier specific to a
+ pragma (see 2.8) and does not denote any declaration. If the
+ storage_pool_indicator is Standard, then there shall not be a
+ declaration with defining identifier Standard that is immediately
+ visible at the point of the pragma, other than package Standard
+ itself.
+
+AARM Reason: The Standard storage_pool_indicator does not resolve to the package
+ Standard as it is an identifier specific to a pragma. Resolving to package
+ Standard would imply that the standard pool is an object declared in that
+ package. A storage pool object however must be a variable (see 13.11), yet
+ preelaborable packages depend on package Standard, which would require
+ implementers to implement the standard storage pool with
+ Preelaborable_Initialization, which is an unnecessary restriction.
+
+ No declaration of Standard can ever be use-visible, as the language-defined
+ non-overloadable definition of Standard will hide any use-visible declarations.
+ Thus we need only concern ourselves with immediately visible declarations
+ with the defining identifier Standard; that eliminates any possible
+ confusion.
+End AARM Reason.
+
+Modify 13.11.3(5/3):
+
+ The language-defined aspect Default_Storage_Pool may be specified for a
+ generic instance; it defines the default pool for access types within an
+ instance. {The Default_Storage_Pool aspect may be specified as Standard,
+ which defines the default pool to be Standard, otherwise the} [The] expected
+ type for the Default_Storage_Pool aspect is Root_Storage_Pool'Class[.
+ The]{and the} aspect_definition must be a name that denotes a variable. This
+ aspect overrides any Default_Storage_Pool pragma that might apply to the
+ generic unit; if the aspect is not specified, the default pool of the
+ instance is that defined for the generic unit.
+
+ Standard when used aspect_definition for the Default_Storage_Pool aspect is
+ an identifier specific to an aspect (see 13.1.1) and does not denote any
+ declaration. If the aspect_definition for the Default_Storage_Pool aspect
+ is Standard, then there shall not be a declaration with defining identifier
+ Standard that is immediately visible at the point of the aspect, other than
+ package Standard itself.
+
+Modify 13.11.3(6.2/3):
+
+ If the default pool is {neither} [non]null {nor Standard}, the Storage_Pool
+ attribute is that pool.
+
+Modify 13.11.3(6.3/3):
+
+ Otherwise {(including when the default pool is specified as Standard)},
+ [there is no default pool;] the standard storage pool is used for the type as
+ described in 13.11.
+
+
+!ASIS
-Start%%%
-Some were concerned about confusion between the identifier-specific-to-a-pragma
-Standard and some entity named "Standard". However, such an entity can never be
-use-visible (as the language-defined Standard is always directly visible and not
-overloadable); therefore it would have to have immediate-visibility for there to
-be any confusion. While immediate-visibility can occur between parent and child
-packages, which is a case similar to use-visibility, it was felt that this
-possibility would be obvious enough and unlikely to occur, so we do not bother
-with any sort of check for this case. "Standard" is always interpreted as an
-identifier specific to the pragma when it occurs in a Default_Storage_Pool
-pragma or aspect. [Author' Note: This last paragraph marked with %%% should be
-deleted if we decide to keep the wording above about the legality check against
-names conflicting with "Standard"]
-End%%%
+No ASIS effect. (ASIS doesn't do anything special with pragma arguments.)
!ACATS test
Questions? Ask the ACAA Technical Agent