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

Differences between 1.4 and version 1.5
Log of other versions for file ai12s/ai12-0034-1.txt

--- ai12s/ai12-0034-1.txt	2013/07/18 01:28:08	1.4
+++ ai12s/ai12-0034-1.txt	2013/07/18 01:56:24	1.5
@@ -1,5 +1,7 @@
-!standard E.4(8)                               13-06-15    AI12-0034-1/03
+!standard E.4(8)                               13-07-17    AI12-0034-1/04
 !class binding interpretation 12-06-06
+!status Amendment 202x 13-07-17
+!status ARG Approved 9-0-0  13-06-16
 !status work item 12-06-06
 !status received 12-05-11
 !priority Low
@@ -13,8 +15,8 @@
 !question
 
 It should not be possible to make a remote stream attribute call (because
-such a stream attribute by definition could not be used in marshalling and
-unmarshalling), and because all stream attributes contain an anonymous
+such a stream attribute call by definition could not be used in marshalling
+and unmarshalling), and because all stream attributes contain an anonymous
 access type that does not support external streaming.
 
 However, it is certainly possible to do this with a remote access-to-classwide
@@ -40,13 +42,13 @@
     with Pack1;
     package Pack2 is
         pragma Remote_Types;
-        type Root_Acc is access all Pack1.Root'Class; -- [1]
+        type Root_Acc is access all Pack1.Root'Class;
     end Pack2;
 
     with Pack1, Pack2, Ada.Streams;
     procedure Test1 (The_Obj : Pack2.Root_Acc) is
     begin
-        Pack1.Root'Class'Write (Stream, The_Obj.all);  -- Legal? ([1] is illegal.)
+        Pack1.Root'Class'Write (Stream, The_Obj.all);  -- Legal? (No.)
         Pack1.Inner.Do_Write (Stream, The_Obj.all); -- Illegal.
         Pack1.Prim (4, The_Obj.all); -- OK.
     end Test1;
@@ -68,10 +70,10 @@
   "Remote Subprogram Calls");
 
 AARM Ramification: Stream attributes of the designated type are not
-primitive operations of the designated type, and thus are prohibited
-by this rule. This is good, as the access parameter of a stream attribute
-does not have external streaming, and thus cannot be a parameter of a
-remote call.
+primitive operations of the designated type, and thus remote calls to them
+are prohibited by this rule. This is good, as the access parameter of a
+stream attribute does not have external streaming, and thus cannot be a
+parameter of a remote call.
 
 [Editor's note: This is the solution proposed by Thomas Quinot. He's right
 that stream attributes aren't primitive operations of any type (see the
@@ -120,6 +122,24 @@
 local. As such, there should be a permission to make local calls to local
 routines (and perhaps an aspect "All_Calls_Remote" on the remote
 access-to-classwide to revoke that permission if that is actually useful).
+
+[This second issue is related to the one covered by AI12-0031-1. That AI
+concludes that optimization of calls is in fact allowed unless
+All_Calls_Remote is given; see that AI.]
+
+!corrigendum E.2.2(16)
+
+@drepl
+@xbullet<A value of a remote access-to-class-wide type shall be dereferenced
+(or implicitly converted to an anonymous access type) only as part of a
+dispatching call where the value designates a controlling operand of the
+call (see E.4, "Remote Subprogram Calls");>
+@dby
+@xbullet<A value of a remote access-to-class-wide type shall be dereferenced
+(or implicitly converted to an anonymous access type) only as part of a
+dispatching call to a primitive operation of the designated type where the
+value designates a controlling operand of the call (see E.4,
+"Remote Subprogram Calls");>
 
 !ASIS
 

Questions? Ask the ACAA Technical Agent