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

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

--- ai12s/ai12-0028-1.txt	2012/06/05 04:44:44	1.1
+++ ai12s/ai12-0028-1.txt	2012/07/17 22:51:00	1.2
@@ -1,4 +1,4 @@
-!standard B.3(75)                                 12-06-04    AI12-0028-1/01
+!standard B.3(75)                                 12-07-15    AI12-0028-1/02
 !class binding interpretation 12-06-04
 !status work item 12-06-04
 !status received 12-04-13
@@ -7,7 +7,8 @@
 !subject Import of variadic C functions
+A new convention, C_Variadic_*N* is introduced to handle C functions with variable
+numbers of parameters.
@@ -28,26 +29,46 @@
-** TBD.
+(See summary.)
-** TBD.
+In B.3(1/3) replace
+    ... and support for specifying the Convention aspect
+    with *convention* identifiers C and C_Pass_By_Copy.
+    ... 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.
+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
+    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
+    additional parameters. The C_Variadic_*n* convention shall only
+    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).
+In B.3(75). replace
+   "A C function that takes a variable number of arguments"
+   "A variadic C function"
-The classification of this AI is difficult.
-If we only fix the note B.3(75), then the AI is a Ramification (as no normative
-changes are made).
-If we add some language-defined way to support variadic C functions, then we
-have a choice: the AI could be either a Binding Interpretation (if we consider
-this problem important and fundamental, as I do), or an Amendment (if we
-consider the extra support an extension). Note that adding a language name is
-something that any implementation can do, so even classifying the AI as an
-Amendment AI would not prevent compilers from implementing the solution in Ada
-95 and Ada 2005 compilers. As such the classification does not matter that much,
+This AI is classified as a Binding Interpretation, applying to Ada 2012.
+Note that adding a language name is something that any implementation can do,
+so Ada 95 and Ada 2005 compilers also can implement the solution.
+As such the classification does not matter that much,
 but it seems better to encourage adoption in Ada 2005 compilers (else it is
 impossible to write portable interfaces without resorting to writing C code,
 which should never be required lest programmers wonder why they're using Ada at

Questions? Ask the ACAA Technical Agent