CVS difference for ai05s/ai05-0188-1.txt

Differences between 1.10 and version 1.11
Log of other versions for file ai05s/ai05-0188-1.txt

--- ai05s/ai05-0188-1.txt	2010/10/19 03:00:44	1.10
+++ ai05s/ai05-0188-1.txt	2010/10/22 00:59:25	1.11
@@ -1,4 +1,4 @@
-!standard 3.10.2(9/2)                                10-10-18  AI05-0188-1/07
+!standard 3.10.2(9/2)                                10-10-21  AI05-0188-1/08
 !standard 3.10.2(19.2/3)
 !standard 4.5.7(0)
 !standard 4.5.8(0)
@@ -97,17 +97,17 @@
 Add after 3.10.2(19.2/3), as a separate bulleted item:
 
    If a given accessibility level is statically deeper than the
-   levels of each of the dependent_expressions of a
+   levels of any of the dependent_expressions of a
    conditional_expression, then the given level is statically deeper than
    that of the conditional_expression. Similarly, if the accessibility
-   level of each dependent_expression of a conditional_expression is
+   level of any dependent_expression of a conditional_expression is
    statically deeper than some given level, then the accessibility
    level of the conditional_expression is statically deeper than
    the given level.
 
     AARM note: Roughly speaking, a "statically deeper than"
     relation involving a conditional_expression holds if and
-    only if the same relation would hold for every
+    only if the same relation would hold for some
     dependent_expression of the conditional_expression.
 
 
@@ -312,10 +312,10 @@
 any other.>
 
 @xbullet<If a given accessibility level is statically deeper than the
-levels of each of the @i<dependent_>@fa<expression>s of a
+levels of any of the @i<dependent_>@fa<expression>s of a
 @fa<conditional_expression>, then the given level is statically deeper than
 that of the @fa<conditional_expression>. Similarly, if the accessibility
-level of each @i<dependent_>@fa<expression> of a @fa<conditional_expression>
+level of any @i<dependent_>@fa<expression> of a @fa<conditional_expression>
 is statically deeper than some given level, then the accessibility
 level of the @fa<conditional_expression> is statically deeper than
 the given level.>
@@ -1473,5 +1473,33 @@
 order for the entire expression to be illegal, which seems like enough.
 
 I'll leave wording this as an exercise for the OP (original poster) - Mr. Baird.
+
+****************************************************************
+
+From: Steve Baird
+Sent: Tuesday, October 19, 2010 11:45 AM
+
+[He's commenting on version /07, which he had sent the previous day. - Editor.]
+
+I think we want to replace both occurrences of "each" in the above wording with
+"any" and replace the occurrence of "every" in the AARM note with "some".
+
+I think all the legality rules are of the form
+"blah1 shall *not* be statically deeper than blah2", so that we want an
+"is statically deeper" test to return False in the "mixed" case.
+
+For example, I think we don't want to allow
+
+     type Ref is access constant Integer;
+     type Rec is record F : aliased Integer; end record;
+     Global : Rec;
+     Ptr : Ref;
+
+     procedure Foo (Flag : Boolean) is
+         Local : Rec;
+     begin
+         Ptr := Rec'(if Flag then Global else Local)'Access;
+
+and I think the wording I proposed yesterday would allow this.
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent