CVS difference for ai05s/ai05-0030-2.txt

Differences between 1.8 and version 1.9
Log of other versions for file ai05s/ai05-0030-2.txt

--- ai05s/ai05-0030-2.txt	2010/07/08 02:04:20	1.8
+++ ai05s/ai05-0030-2.txt	2010/08/13 05:32:35	1.9
@@ -523,3 +523,47 @@
 
 ****************************************************************
 
+!topic type pragma Implemented
+!reference Ada 2010 RM 9.5(14/3)
+!from Grein 2010-06-22
+!discussion
+RM 9.5(14/3) states: "A pragma Implemented with implementation_kind
+By_Protected_Procedure shall not be applied to a primitive procedure of a
+task interface." Does it make sense to allow specification of pragma
+Implemented at all for a task interface, because such an interface can
+only be implemented by a task and hence the only implementation_kind allowed
+in fact is By_Entry?
+
+Or do I miss something? If not, delete this sentence.
+
+****************************************************************
+
+From: Adam Beneschan
+Sent: Tuesday, June 22, 2010  10:15 AM
+
+I think you did miss something.  An operation of a task interface can be
+overridden by a normal procedure---or, if it's declared "is null", it doesn't
+have to be overridden at all.  I believe this is legal:
+
+   type Task_Int is task interface;
+   procedure Op1 (T : Task_Int; Param1 : Integer) is abstract;
+   procedure Op2 (T : Task_Int; Param1 : Integer) is null;
+
+...
+
+   type T1 is new Task_Int with
+      ... entries, not Op1 or Op2
+   end T1;
+   
+   overriding
+   procedure Op1 (T : T1; Param1 : Integer);
+   -- no declaration of Op2!
+
+It is legal for Op1 to be overridden with a procedure declaration, and for
+Op2 not to be overridden or implemented by anything.  But in either case, if
+pragma Implemented(By_Entry) were applied to the operation of Task_Int, the code
+would be illegal because the operation isn't implemented by an entry.  So the
+pragma would *not* be redundant. 
+
+****************************************************************
+

Questions? Ask the ACAA Technical Agent