Reality check (Was Re: prototypes required ?)

Doug Gwyn gwyn at smoke.brl.mil
Thu Nov 1 13:15:55 AEST 1990


In article <MEISSNER.90Oct22135944 at osf.osf.org> meissner at osf.org (Michael Meissner) writes:
>The one thing that varargs can do which stdarg can't, is vary the type
>of the first parameter, since stdarg requires at least one
>non-varardic argument to hook into.  In the ANSI meetings this was
>brought up and dismissed due to thinking the case was artifical, and
>that no real code actually dependend on it.  Well we just found that
>one OS test suite does in fact depend on this, and only passes one
>argument to a varardic function, using other means to tell what type
>the argument is.  In a similar vein, you can't have a stdarg function
>which takes zero or more arguments....

I don't think the sole argument was that no real code would attempt that,
but rather that the hook may well be necessary for some implementations.
Obvious it would have been nicer if we could have required support for
"function(...)", but there were counterexamples so we ended up needing to
require a fixed "anchor" for the va_start() macro to grab hold of.

What OS test suite is that?  If it's the NIST one for 1003.1, no wonder.
I've heard nothing good about that suite.



More information about the Comp.std.c mailing list