ANSI: va_list in <stdio.h>
Roland McGrath
rk9005 at cca.ucsf.edu
Wed Apr 13 10:45:18 AEST 1988
Since the prototypes for v*printf in <stdio.h> use the `va_list' type,
that type must be defined.
I see several ways that this can be handled:
1) Don't define `va_list' at all in <stdio.h>
- The Standard doesn't say <stdio.h> defines `va_list'
Sub-methods:
a) If the user hasn't included <stdarg.h> just let him get
error messages (OUT OF THE QUESTION)
b) Only declare v*printf if <stdarg.h> is included. (maybe OK)
2) Do define `va_list' in <stdio.h>:
Sub_methods:
a) Have <stdio.h> include <stdarg.h> (probably not)
- The Standard doesn't say <stdio.h> defines all those things.
b) Have <stdio.h> define only `va_list' (maybe)
I think 2b is generally good, 1b is definitely strictly-conformant, since
the descriptions of v*printf say `#include <stdarg.h>'.
Any words from the horse's mouth?
--
Roland McGrath
ARPA: roland at rtsg.lbl.gov roland at lbl-rtsg.arpa
UUCP: ...!ucbvax!lbl-rtsg.arpa!roland
More information about the Comp.lang.c
mailing list