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

Differences between 1.4 and version 1.5
Log of other versions for file ai05s/ai05-0248-1.txt

--- ai05s/ai05-0248-1.txt	2011/05/03 06:33:29	1.4
+++ ai05s/ai05-0248-1.txt	2011/05/19 05:00:55	1.5
@@ -1,4 +1,6 @@
-!standard 11.4.1(10.1/2)                            11-05-02    AI05-0248-1/04
+!standard 4.6(24.17/2)                           11-05-18    AI05-0248-1/05
+!standard 4.6(48)
+!standard 11.4.1(10.1/2)
 !standard A.1(35)
 !standard A.4.10(0)
 !standard A.16(20)
@@ -38,6 +40,7 @@
 !standard F.3.2(73)
 !class presentation 11-03-31
 !status Amendment 2012 11-03-31
+!status ARG Approved (by Letter Ballot) 11-0-0  11-05-16
 !status work item 11-03-31
 !status received 10-09-16
 !priority Medium
@@ -60,6 +63,10 @@
 
 [Note: /3 paragraph numbers are from draft 11.]
 
+Modify 4.6(24.17/3) and 4.6(48/3): "...unless the target {type} is {an anonymous
+access type of} a stand-alone object[ of an anonymous access type]. If the target
+{type} is {that of} such a stand-alone object, ..."
+
 In 11.4.1(10.1/3), replace "For an occurrence originally raised for some other
 reason," with "For an occurrence originally raised in some other manner
 (including by the failure of a language-defined check),"
@@ -259,6 +266,39 @@
 A.18.26(11/2): Generic_Sort should have performance requirements like all of the
 other sorting subprograms in A.18.
 
+!corrigendum 4.6(24.17/2)
+
+@drepl
+@xinbull<The accessibility level of the operand type shall not be statically
+deeper than that of the target type. 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.>
+@dby
+@xinbull<The accessibility level of the operand type shall not be statically
+deeper than that of the target type, unless the target type is an anonymous access
+type of a stand-alone object. If the target type is that of such a stand-alone
+object, the accessibility level of the operand type
+shall not be statically deeper than that of the declaration of the
+stand-alone object. 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.>
+
+!corrigendum 4.6(48)
+
+@drepl
+@xinbull<For an access-to-object type, a check is made that the accessibility
+level of the operand type is not deeper than that of the target
+type.>
+@dby
+@xinbull<For an access-to-object type, a check is made that the accessibility
+level of the operand type is not deeper than that of the target
+type, unless the target type is an anonymous access type of a stand-alone
+object. If the target type is that of such a stand-alone object, a check is
+made that the accessibility level of the operand type is not deeper
+than that of the declaration of the stand-alone object; if the
+check suceeds, the accessibility level of the target type becomes that of
+the operand type.>
+
 !corrigendum 11.4.1(10.1/2)
 
 @drepl
@@ -3766,5 +3806,105 @@
 markup error. Of course, those happen. So a scrub isn't a bad idea, I'm glad
 that you volunteered. :-) You'll find it on your next action item list. I did
 fix the ones you noted, of course.
+
+****************************************************************
+
+From: Steve Baird
+Sent: Tuesday, May 17, 2011  9:50 PM
+
+Gary and I each independently noticed this one (see below) recently.
+
+Do you think
+   a) there is no problem here
+   b) there is a minor problem which is not worth fixing at this point
+   c) there is a problem which needs fixing
+   d) there are two problems and their names are Gary and Steve ?
+
+   -- Steve
+
+P.S. After writing "stand-alone object of an anonymous access type"
+      as often as I have recently, most anyone would start using the
+      term "saooaaat".
+
+====
+
+The RM wording for type conversions is somewhat bogus.
+
+There is a rule that "statically deeper" rules never apply to a saooaaat. But
+we sort of want them to apply in a case like
+
+      Ptr : access Integer;
+    begin
+      declare
+         X : aliased Integer;
+      begin
+         Ptr := X'Access;
+
+so we've got the rule in 4.6:
+
+   The accessibility level of the operand type shall not be statically
+   deeper than that of the target type, unless the target is a
+   stand-alone object of an anonymous access type. If the target is such
+   a stand-alone object, the accessibility level of the operand type
+   shall not be statically deeper than that of the declaration of the
+   stand-alone object.
+
+This wording refers to "the target" as if we were already talking about a target and
+had established that bit of context.
+
+But this is the first we've heard of any target object. There is earlier talk about the
+target type of the conversion, but that's different.
+
+****************************************************************
+
+From: Gary Dismukes
+Sent: Wednesday, May 18, 2011  12:54 PM
+
+...
+> P.S. After writing "stand-alone object of an anonymous access type"
+>       as often as I have recently, most anyone would start using the
+>       term "saooaaat".
+
+Works for me.
+
+...
+> This wording refers to "the target" as if we were already talking 
+> about a target and had established that bit of context.
+> 
+> But this is the first we've heard of any target object. There is 
+> earlier talk about the target type of the conversion, but that's 
+> different.
+
+I think the "unless" part of the wording can only be applying to implicit
+conversions to the anonymous type of a saooaaat, so I think it may just be a
+matter of changing the wording to say something like:
+
+  "unless the target type is an anonymous access type of a stand-alone
+   object.  If the target type is that of such a stand-alone object, ..."
+
+Does that seem like the right fix, or is there more to this than I'm seeing?
+
+****************************************************************
+
+From: Steve Baird
+Sent: Wednesday, May 18, 2011  1:42 PM
+
+Looks good to me.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Wednesday, May 18, 2011  10:13 PM
+
+Me too, I've updated everything this way.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Wednesday, May 18, 2011  10:31 PM
+
+It should be noted that there is a matching dynamic check, and that too needs this
+same wording change. Indeed, I initially fixed that and not the static rule you
+asked about.
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent