`va_dcl' macro question
Doug Gwyn
gwyn at smoke.BRL.MIL
Fri Jan 27 08:41:11 AEST 1989
In article <1964 at kappl.cs.vu.nl> maart at cs.vu.nl (Maarten Litmaath) writes:
>Anybody got an example (of some weird architecture) to show why it has been
>decided that no semicolon shall follow `va_dcl'?
No, but it's always been that way and nobody is going to change it now.
> int printf(fmt, va_alist)
> char *fmt;
> va_dcl;
> {
> ...
> }
Apart from the question of the semicolon, this is wrong anyway.
It's not permissible to mix fixed parameter declarations with the
va_alist. va_alist must stand alone as the only parameter, with
known parameters then being fetched from it via va_arg. This of
course applies only to varargs; in ANSI C, one has at least one
fixed parameter and uses the ,... notation.
More information about the Comp.lang.c
mailing list