On Sep 29, 2011, at 5:54 PM, Basile Starynkevitch wrote:

> On Thu, 29 Sep 2011 17:10:26 +0200
> Tristan Gingold <ging...@adacore.com> wrote:
> 
>> Hi,
>> 
>> DEC-C, the DEC compiler provided on VMS, has added to ANSI-C at least one 
>> extension that is difficult to work-around as it is used in the system 
>> headers: varargs without named argument.  It makes sense on VMS because of 
>> its ABI which pass the number of arguments used.
>> 
> 
> I believe that such an extension is useful on other systems, even when their 
> ABI don't
> pass the number of arguments.
> 
> The use case I would have in mind is when the signature of the called 
> function (that is
> the number & types of arguments) is determined by something else, perhaps a 
> global
> variable or data. Think e.g. of a printf-like function, except that the 
> format string is
> conventionally assigned to some fixed global before calling it.

In fact you can't access to the arguments with ANSI-C as va_start needs a named 
argument. So you can't write such code.

Tristan.

Reply via email to