This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ada in gcc-3.4.3 on x86_64


Florian Weimer wrote:

   procedure printf_int (S : Interfaces.char_array, V : interfaces.int);
   pragma Import (C_Varargs, printf_int, External_Name => "printf");

In the pragma, you'd have to specify the number of non-variadic
arguments.  I'm pretty sure that this number may also affect the
calling convention.  This seems to follow from 6.7.5.3(15) (in the
C Standard).

No, you don't need to specify this, since the pragma is a pragma Import for a specific variant, e.g. in my example above, you know that you are talking about the two argument case.

Remember, I am NOT proposing adding a pragma, but rather adding a
convention for use by pragma Import.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]