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

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

--- ai12s/ai12-0401-1.txt	2020/10/16 03:46:08	1.1
+++ ai12s/ai12-0401-1.txt	2020/10/22 23:59:00	1.2
@@ -1,12 +1,14 @@
-!standard 3.3(23.2/3)                                    20-10-15  AI12-0401-1/01
-!standard 8.5.1(4/5)
+!standard 3.3(23.2/3)                                    20-10-21  AI12-0401-1/02
+!standard 8.5.1(4.7/5)
 !class binding interpretation 20-10-15
+!status Amendment 1-2012 20-10-21
+!status ARG Approved 13-0-1  20-10-21
 !status work item 20-10-15
 !status received 20-10-15
 !priority Low
 !difficulty Easy
 !qualifier Omission
-!subject Renaming of qualified expression of variable
+!subject Renaming of a qualified expression of a variable
 !summary
 
 We restrict renaming of a qualified expression to cases where the operand is a
@@ -19,11 +21,11 @@
 
 !question
 
-In the following situation:
+Consider the following situation:
    X : T := ...;
    Y : S renames S'(X);
    
-if X is a variable and its nominal subtype is not the same as S, and in
+If X is a variable and its nominal subtype is not the same as S, and in
 particular has a subtype that includes values that do not all satisfy S,
 then a later update to X to give it a value that is not within the subtype S
 could create a bizarre situation where Y no longer satisfies its nominal
@@ -34,7 +36,7 @@
 Disallow renaming of a qualified expression if the operand denotes a
 variable with a nominal subtype that does not statically match the
 target subtype of the qualified expression, unless the target subtype
-imposes no  constraints or predicates.
+imposes no constraints or predicates.
 
 !wording
 
@@ -46,9 +48,9 @@
     partial view{, and it is neither a value conversion nor a
     qualified_expression}; or
 
-Add after 8.5.1(4/5):
+Add after 8.5.1(4.7/5):
   
-  In the case where the /object_/name is a qualified expression whose
+  In the case where the /object_/name is a qualified_expression whose
   expression is a name that denotes a variable, the nominal subtype of
   the [Redundant:(constant)] view denoted by the qualified_expression
   shall statically match the nominal subtype of that variable, or
@@ -65,7 +67,7 @@
 tools would have to perform in a renaming of a qualified expression.  It
 became clear that there was an erroneous situation lurking here, if we
 allow a renaming of a constant view of a variable that could later be
-altered to no satisfy the nominal subtype of the qualified expression.
+altered to no longer satisfy the nominal subtype of the qualified expression.
 
 We modify the rule in 3.3(23.2/3) so that known-to-be-constrained is
 determined by the operand of a conversion or a qualified_expression
@@ -74,6 +76,10 @@
 qualified (or converted) object is not itself "known to be constrained".
 That was always intended, but not captured by the rules.
 
+Both of these changes are incompatable with Ada 2012 as defined, but are
+necessary to meet the design goal that a legal renaming cannot be of something
+that can be changed in a way that can cause erroneous execution.
+
 Note that we don't need to worry about generic formal in-out objects,
 even though they are effectively renames of the generic actual object,
 because a qualified_expression is a constant view, so would not be
@@ -88,6 +94,27 @@
    
 The renaming will be illegal unless S statically matches T, T'Base (if
 scalar), or the first subtype of T (if nonscalar).
+
+!corrigendum 3.3(23.2/3)
+
+@drepl
+@xbullet<its nominal subtype is constrained, and is not an untagged partial view; or>
+@dby
+@xbullet<its nominal subtype is constrained and not an untagged partial view, and 
+it is neither a value conversion nor a @fa<qualified_expression>; or>
+
+!corrigendum 8.5.1(4.6/2)
+
+@dinsa
+@xbullet<otherwise, the subtype of the @i<object_>@fa<name> shall exclude null.
+In addition to the places where Legality Rules normally apply (see 12.3), this
+rule applies also in the private part of an instance of a generic unit.>
+@dinst
+In the case where the @i<object_>@fa<name> is a @fa<qualified_expression> whose
+@fa<expression> is a @fa<name> that denotes a variable, the nominal subtype of
+the (constant) view denoted by the @fa<qualified_expression> shall statically 
+match the nominal subtype of that variable, or statically match either the 
+base subtype of its type if scalar, or the first subtype of its type otherwise.
 
 !ASIS
 

Questions? Ask the ACAA Technical Agent