CVS difference for ai05s/ai05-0228-1.txt
--- ai05s/ai05-0228-1.txt 2011/01/06 01:39:33 1.5
+++ ai05s/ai05-0228-1.txt 2011/03/12 03:04:30 1.6
@@ -1,10 +1,12 @@
-!standard 3.3.1(11) 10-11-19 AI05-0228-1/03
+!standard 3.3.1(11) 11-03-11 AI05-0228-1/04
!standard 3.3.1(12)
!standard 3.3.1(21)
!standard 3.5(56/2)
!standard 3.6(22/2)
!standard 6.4.1(13)
!class Amendment 10-10-22
+!status Amendment 2012 11-03-11
+!status ARG Approved 7-0-0 10-02-19
!status work item 10-10-22
!status received 10-10-22
!priority Medium
@@ -68,7 +70,7 @@
There is no implicit initial value for a scalar subtype{ unless the
Default_Value aspect has been specified for the type}. In the absence of an
-explicit initialization{ or the explicit specification of the Default_Value
+explicit initialization{ or the specification of the Default_Value
aspect}, a newly created scalar object might have a value that does not belong
to its subtype (see 13.9.1 and H.1).
@@ -76,12 +78,29 @@
Static Semantics
- For a scalar type, the following language-defined aspect
+ For a scalar type, the following language-defined representation aspect
may be specified with an aspect_specification:
Default_Value
- This aspect shall be specified by a static expression.
+ This aspect shall be specified by a static expression, and that
+ expression shall be explicit, even if the aspect has a boolean type.
Default_Value shall be specified only on a full_type_declaration.
+AARM Reason: The part about requiring an explicit expression is to disallow
+omitting the value for this aspect, which would otherwise be allowed by the
+rules of 13.3.1.
+
+This is a representation attribute in order to disallow specifying it on a
+derived type that has inherited primitive subprograms; that is necessary as
+the sizes of *out* parameters could be different whether or not a Default_Value
+is specified (see 6.4.1).
+End AARM Reason.
+
+If a derived type with no primitive subprograms inherits a boolean Default_Value
+aspect, the aspect may be specified to have any value for the derived type.
+
+AARM Reason: This is to override the 13.3.1 rule that says that a boolean aspect
+with a value True cannot be changed.
+
Name Resolution
The expected type for the expression specified for the Default_Value aspect is
@@ -92,16 +111,29 @@
Static Semantics
For an array type with a scalar component type, the following
- language-defined aspect may be specified with an aspect_specification:
+ language-defined representation aspect may be specified with an
+ aspect_specification:
Default_Component_Value
- This aspect shall be specified by a static expression.
+ This aspect shall be specified by a static expression, and that
+ expression shall be explicit, even if the aspect has a boolean type.
Default_Component_Value shall be specified only on a full_type_declaration.
+AARM Reason: The part about requiring an explicit expression is to disallow
+omitting the value for this aspect, which would otherwise be allowed by the
+rules of 13.3.1.
+
+If a derived type with no primitive subprograms inherits a boolean Default_Value
+aspect, the aspect may be specified to have any value for the derived type.
+
+AARM Reason: This is to override the 13.3.1 rule that says that a boolean aspect
+with a value True cannot be changed.
+
Name Resolution
The expected type for the expression specified for the Default_Component_Value aspect
is the component type of the array type defined by the full_type_declaration.
+
Add a new bullet after 6.4.1(13): [Note that 6.4.1(13) was modified by AI05-0196-1 --
we echo that wording here, not the original wording.]
@@ -113,6 +145,11 @@
with an implicit initial value are initialized. This is important so that a programmer
can guarantee that all objects of a scalar type have a valid value with a carefully
chosen Default_Value.
+
+AARM Implementation Note: This rule means that *out* parameters of a subtype T with
+a specified Default_Value need to be large enough to support any possible value of the
+base type of T. In contrast, a type that does not have a Default_Value only need
+support the size of the subtype (since no values are passed in).
[Editor's note: We don't need to modify the composite rule, as the changed definition
of "implicit initial values" effectively changes this rule to include arrays with
Questions? Ask the ACAA Technical Agent