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

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

--- ai12s/ai12-0028-1.txt	2012/07/19 02:42:10	1.3
+++ ai12s/ai12-0028-1.txt	2013/01/03 04:49:48	1.4
@@ -1,7 +1,9 @@
-!standard B.3(1/3)                                 12-07-15    AI12-0028-1/02
+!standard B.3(1/3)                                 13-01-02    AI12-0028-1/03
 !standard B.3(60.15/3)
 !standard B.3(75)
 !class binding interpretation 12-06-04
+!status Amendment 202x 13-01-02
+!status ARG Approved 9-0-2  12-12-08
 !status work item 12-06-04
 !status received 12-04-13
 !priority Medium
@@ -25,7 +27,7 @@
 different, which leads to unpredictable results when importing variadic C
 functions.
 
-Should this note should be rewritten or deleted? (Yes.)
+Should this note be rewritten or deleted? (Yes.)
 
 Should Ada have some standard way of interfacing to variadic C functions? (Yes.)
 
@@ -41,13 +43,12 @@
 with
     ... and support for specifying the Convention aspect
     with *convention* identifiers C, C_Pass_By_Copy, and
-    any of the C_Variadic_*N* conventions described below.
+    any of the C_Variadic_*n* conventions described below.
 
 Append after B.3(60.15/3)
 
-    For some implementation-dependent integer M greater than or equal
-    to 16, the identifiers C_Variadic_0, C_Variadic_1, C_Variadic_2,
-    and on up to C_Variadic_*M* are convention identifiers. These
+    The identifiers C_Variadic_0, C_Variadic_1, C_Variadic_2, and so
+    on are convention_identifiers. These
     conventions are said to be *C_Variadic*. The convention
     C_Variadic_*n* is the calling convention for a variadic C function
     taking *n* fixed parameters and then a variable number of
@@ -55,12 +56,15 @@
     be specified as the convention aspect for a subprogram, or for an
     access-to-subprogram type, having at least *n* parameters. A type
     is compatible with a C_Variadic convention if and only if the type is
-    C-compatible. Specifying a C_Variadic convention for a type has
-    the same effect on the representation of the type as specifying a
-    convention of C (i.e., the type is represented according to the
-    conventions of the supported C implementation).
+    C-compatible.
 
-In B.3(75). replace
+AARM To Be Honest: It is implementation defined what the largest *n* in
+C_Variadic_*n* is supported. We don't say this because it complicates the
+wording and it is true for almost any convention_identifier (only Ada is
+required to be supported by the language, all others need to be documented
+in order for programmers to know that they are available).
+
+In B.3(75), replace
    "A C function that takes a variable number of arguments"
 with
    "A variadic C function"
@@ -76,9 +80,49 @@
 which should never be required lest programmers wonder why they're using Ada at
 all).
 
+!corrigendum B.3(1/3)
+
+@drepl
+The facilities relevant to interfacing with the C language and the corresponding
+subset of the C++ language are the package Interfaces.C and its children, and
+support for specifying the Convention aspect with @i<convention_>@fa<identifier>s
+C and C_Pass_By_Copy.
+@dby
+The facilities relevant to interfacing with the C language and the corresponding
+subset of the C++ language are the package Interfaces.C and its children, and
+support for specifying the Convention aspect with @i<convention_>@fa<identifier>s
+C, C_Pass_By_Copy, and any of the C_Variadic_@i<n> conventions described below.
+
+!corrigendum B.3(60.15/3)
+
+@dinsa
+If a type is C_Pass_By_Copy-compatible, then it is also C-compatible.
+@dinst
+The identifiers C_Variadic_0, C_Variadic_1, C_Variadic_2, and so
+on are @i<convention_>@fa<identifier>s. These
+conventions are said to be @i<C_Variadic>. The convention
+C_Variadic_@i<n> is the calling convention for a variadic C function
+taking @i<n> fixed parameters and then a variable number of
+additional parameters. The C_Variadic_@i<n> convention shall only
+be specified as the convention aspect for a subprogram, or for an
+access-to-subprogram type, having at least @i<n> parameters. A type
+is compatible with a C_Variadic convention if and only if the type is
+C-compatible.
+
+!corrigendum B.3(75)
+
+@drepl
+@s9<A C function that takes a variable number of arguments can correspond to
+several Ada subprograms, taking various specific numbers and types of parameters.>
+@dby
+@s9<A variadic C function can correspond to
+several Ada subprograms, taking various specific numbers and types of parameters.>
+
 !ACATS test
 
-** TBD.
+An ACATS C-Test could be created to interface to a variadic C function (provided
+by the test suite) using these identifiers. It's not clear that such a test would
+be of much value.
 
 !appendix
 

Questions? Ask the ACAA Technical Agent