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

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

--- ai05s/ai05-0002-1.txt	2007/04/06 04:37:11	1.2
+++ ai05s/ai05-0002-1.txt	2007/07/26 02:58:04	1.3
@@ -1,5 +1,6 @@
-!standard B.03(19)                                  07-04-05  AI05-0002-1/02
-!standard B.03(39)
+!standard B.01(17)                                  07-06-11  AI05-0002-1/03
+!standard B.03(62)
+!standard B.03(71.1/2)
 !class binding interpretation 04-08-31
 !status work item 05-05-23
 !status received 04-08-31
@@ -9,9 +10,14 @@
 
 !summary
 
-We do not require support for conventions other than Ada for unconstrained
+Access-to-unconstrained-array is not considered L-compatible, so it is not
+required to be supported.
+
+We do not require support for C convention interfacing pragmas for unconstrained
 array objects, unconstrained array function results, and most unconstrained
-array objects.
+array parameters.
+
+The correspondence between Ada and C for function results is defined.
 
 !question
 
@@ -27,43 +33,39 @@
 
 Replace B.1(17)
 
-    T is an access-to-object type and its designated type is L-compatible.
+    - T is an access-to-object type, and its designated type is L-compatible,
 
 with
 
-    T is an access-to-object type, its designated type is L-compatible,
-    and its designated subtype is not an unconstrained array subtype.
+    - T is an access-to-object type, its designated type is L-compatible,
+      and its designated subtype is not an unconstrained array subtype,
 
-Add after B.3(71):
+Add after B.3(62):
+    An implementation need not support an interfacing pragma specifying
+    convention C or C_Pass_By_Copy in the following cases:
 
-    - An Ada function result is returned as by a C function with a C
-      result type which corresponds to the Ada function result type according
-      to the rules of correspondence given above for parameters of mode IN.
-      
+        - an Export or Convention pragma applied to a subprogram which has
+          a parameter of an unconstrained array subtype;
+
+        - an interfacing pragma applied to a function with
+          an unconstrained array result subtype;
+
+        - an interfacing pragma applied to an object whose nominal subtype is
+          an unconstrained array subtype.
+
 Replace B.3(71.1/2):
 
     An Ada parameter of a private type is passed as specified for the
     full view of the type.
 
 with               
-
-    An Ada parameter of a private type is passed as specified for the
-    full view of the type. An Ada function result of a private type is
-    returned as specified for the full view of the type.
-    
-Add after B.3(62):
-    An implementation need not support an interfacing pragma specifying
-    convention C or C_Pass_By_Copy in the following cases:
-
-        - an interfacing pragma applied to an object whose nominal subtype is
-          an unconstrained array subtype;
-
-        - an Export or Convention pragma applied to a subprogram which has
-          a parameter of an unconstrained array subtype; or
 
-        - an interfacing pragma applied to a function with
-          an unconstrained array result subtype.
+    - An Ada parameter of a private type is passed as specified for the
+      full view of the type.
 
+    - The rules of correspondence given above for parameters of mode IN
+      also apply to the return object of a function.
+      
 
 !discussion
 
@@ -136,7 +138,7 @@
     procedure Proc (X : String);
     pragma Import (C, Proc, "Foobar");
 
-, it is expected that callers will pass in no bounds information.
+it is expected that callers will pass in no bounds information.
 
 ----
 
@@ -212,7 +214,7 @@
 
 ----
 
-Tuck reports that "We support unconstrained arrays as parameters in C
+Tucker Taft reports that "We support unconstrained arrays as parameters in C
 conventions by giving the array the maximum bounds (i.e. index_subtype'first
 .. index_subtype'last)".
 
@@ -236,15 +238,55 @@
     function C_Pbc_Func return C_Pbc_Rec;
     pragma Import (C, C_Pbc_Func);
     
-, and given that that type t is a C struct corresponding to the two Ada
+and given that that type t is a C struct corresponding to the two Ada
 types, function C_Func corresponds to a t*-valued C function whereas
 function C_Pbc_Func corresponds to a t-valued C function. 
+
+!corrigendum B.1(17)
 
---!corrigendum
+@drepl
+@xbullet<T is an access-to-object type, and its designated type is @i<L>-compatible,>
+@dby
+@xbullet<T is an access-to-object type, its designated type is @i<L>-compatible,
+and its designated subtype is not an unconstrained array subtype,>
+
+!corrigendum B.3(62)
+
+@dinsa
+An implementation may provide additional declarations in the C interface packages.
+@dinss
+An implementation need not support an interfacing pragma specifying
+convention C or C_Pass_By_Copy in the following cases:
+
+@xbullet<an Export or Convention pragma applied to a subprogram which has
+a parameter of an unconstrained array subtype;>
+
+@xbullet<an interfacing pragma applied to a function with an
+unconstrained array result subtype;>
+
+@xbullet<an interfacing pragma applied to an object whose nominal subtype is
+an unconstrained array subtype.>
+
+!corrigendum B.3(71.1/2)
+
+@drepl
+An Ada parameter of a private type is passed as specified for the
+full view of the type.
+@dby
+@xbullet<An Ada parameter of a private type is passed as specified for the
+full view of the type.>
 
+@xbullet<The rules of correspondence given above for parameters of mode @b<in>
+also apply to the return object of a function.>
+      
 !example
 
+(See discussion.)
+
 !ACATS test
+
+Create a C-Test checking the correspondences for function returns. The rest of the changes
+are a permission to not support, and thus are not testable.
 
 !appendix
 

Questions? Ask the ACAA Technical Agent