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

Differences between 1.1 and version 1.2
Log of other versions for file ai05s/ai05-0222-1.txt

--- ai05s/ai05-0222-1.txt	2010/10/21 04:47:01	1.1
+++ ai05s/ai05-0222-1.txt	2010/11/19 05:36:23	1.2
@@ -1,6 +1,7 @@
-!standard  3.9.2(13)                             10-10-20    AI05-0222-1/01
+!standard  3.9.2(13)                             10-11-18    AI05-0222-1/02
 !standard  13.14(16)
-!class binding interpretation 10-10-20
+!class ramification 10-11-18
+!status ARG Approved  9-0-1  10-10-30
 !status work item 10-10-20
 !status received 10-03-25
 !priority Low
@@ -49,34 +50,30 @@
 a primitive subprogram, and it's occurring after the type is frozen,
 that 3.9.2(13) makes it illegal.
 
-That clearly makes no sense; should this be fixed? (Yes.)
+That clearly makes no sense; should this be fixed? (No.)
 
-!wording
-
-Modify 3.9.2(13):
-
-The explicit declaration {that is not a completion} of a primitive
-subprogram of a tagged type shall occur before the type is frozen (see 13.14).
-For example, new dispatching operations cannot be added after objects or
-values of the type exist, nor after deriving a record extension from it, nor
-after a body.
+!response
 
-Modify 13.14(16):
+The rules clearly were intended to apply only to "original" declarations,
+and not the declaration of a completion. No user or implementer is going
+to misinterpret these rules, given that a literal interpretation would
+prevent the declaration of any concrete tagged type with primitive operations
+(those operations could never be completed).
 
-The explicit declaration {that is not a completion} of a primitive
-subprogram of a tagged type shall occur before the type is frozen (see 3.9.2). 
+Moreover, one could argue that subprogram declarations in a body are not
+primitive subprograms - whether or not completions of a primitive subprogram
+also is a primitive subprogram when a stand-alone subprogram would not be
+primitive is not clearly addressed by 3.2.3(2-7) -- a literal reading would
+say that they are not.
 
-!discussion
+But that would just make the issue even more confusing.
 
-The example in the question is a pathology.
+With the unlikelyhood of misinterpretation, we simply add a To Be Honest note
+to the AARM to make it crystal clear that completions are not considered.
 
-Subprograms in a package body are not primitive, but may complete a primitive
-subprogram, so it is arguable if these rules apply to them (clearly, they were
-not intended to).
+Note the introduction of expression functions by AI05-0177-1 makes this a more
+significant issue. We would not want the following to be illegal:
 
-But the introduction of expression functions by AI05-0177-1 makes this a more
-significant problem. We would not want the following to be illegal:
-
     package Pak2 is
        type T is tagged private;
        function F (Obj : T) return Boolean;
@@ -87,13 +84,25 @@
        Object : T; -- Freezes T.
        function F (Obj : T) return Boolean is (Obj.Flag);
     end Pak2;
+
 
-So we need to fix this.
+!wording
+
+Add a new AARM note after 3.9.2(13) and after 13.14(16):
+
+AARM To Be Honest: This rule only applies to "original" declarations and
+not to the completion of a primitive subprogram, even though a completion
+is technically an explicit declaration, and it may declare a primitive
+subprogram.
 
 !ACATS Test
 
 An ACATS test could be constructed for the expression function case (the
 example of the question is too much of a pathology to matter).
+
+!ASIS
+
+This has no impact on ASIS.
 
 !appendix
 

Questions? Ask the ACAA Technical Agent