On Fri, 30 Sep 2011 09:24:03 +0200 Tristan Gingold <ging...@adacore.com> wrote:
> > On Sep 29, 2011, at 5:54 PM, Basile Starynkevitch wrote: > > 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. I agree with that point, but that suggests that such a function is not DEC like. (and IIRC, in the good days of <vaargs.h> ten years ago, not today's <stdarg.h>, such a function was possible). I was only saying that there is no reason to call such an extension DEC-like. And apparently, you tested it on a x86/Linux which is not a DEC system :-) And I do think that such an extension can be useful. Cheers. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***