varariable argument functions question (is there a data type for ... ? )

Ingo Krabbe
Sat Sep 9 16:22:00 GMT 2006

Am Samstag, 9. September 2006 16:17 schrieb Charles Lambert:
> Is there a datatype that represents variable arguments in variable
> argument functions [e.g. int foo(int a, ...); ] ?
> If so what is it, and what source file could i find it in?
> I'm trying to make bindings to the objective-c runtime for ada on my
> mac os x 10.4 and there is a line in it as such:
> typedef id 			(*IMP)(id, SEL, ...);
> IMP is used in several structs. Any help with this would be greatly
> appreciated.
> Thank you,
> Charles Lambert

I don't know if there is something like a variadic function in ada.  See for 
example the vprintf how variadic functions are translated into normal 
functions with a va_list argument.

It is defined that a function that has a variadic interface has to use the 
stdarg(3) macros to initialize and read the va_list structure.  There are no 
annotations on how to implement variadic function mechanisms than to provide 
the macros as defined in stdarg(3).

More information about the Gcc-help mailing list