K&R-style variadic functions

deadalnix deadalnix at gmail.com
Tue Jul 17 08:02:35 PDT 2012


On 17/07/2012 08:56, Jacob Carlborg wrote:
> To my understanding this is legal C :
>
> int foo ();
>
> It's a K&R-style variadic functions, while their use is discouraged,
> they're still legal C.
>
> If I, in D, declare a variadic function with C linkage that doesn't
> take, at least, one regular parameter the compiler will complain.
>
> extern (C) int foo (...);
>

It is used in testfptr.d from dmd's testsuite.


More information about the Digitalmars-d mailing list