Article View: comp.std.c
Article #2685Is va_list defined by <stdio.h>?
From: John Gilmore
Date: Fri, 05 Apr 1991 21:47
Date: Fri, 05 Apr 1991 21:47
26 lines
1656 bytes
1656 bytes
In an ANSI C implementation, it appears that the type "va_list" must be
defined by <stdio.h> because it it used to declare the arguments for
vfprintf, vprintf, and vsprintf. However, it is not in the list of
types declared by <stdio.h>, either in Appendix C.10 (page 192) or
in section 4.9.1 (page 125).
The sections that document these particular vXXX functions say, e.g.:
#include <stdarg.h>
#include <stdio.h>
int vsprintf(char *s, const char *format, va_list arg);
but it is not possible for <stdio.h> to declare these functions without
also declaring va_list, since some people will include <stdio.h> without
including <stdarg.h>. <stdio.h> could avoid declaring these functions
if <stdarg.h> was not also included, but the includes could occur in either
order, making things very messy, and I don't think that's what the standards
committee had in mind.
Is this a real omission, or am I missing something?
--
John Gilmore {sun,uunet,pyramid}!hoptoad!gnu gnu@toad.com gnu@cygnus.com
* Truth : the most deadly weapon ever discovered by humanity. Capable of *
* destroying entire perceptual sets, cultures, and realities. Outlawed by *
* all governments everywhere. Possession is normally punishable by death. *
* ..{amdahl|decwrl|octopus|pyramid|ucbvax}!avsd!childers@tycho *
Technical Details
Message-ID:
<16863@hoptoad.uucp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!agate!ucbvax!hoptoad!gnuShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!agate!ucbvax!hoptoad!gnu From: gnu@hoptoad.uucp (John Gilmore) Newsgroups: comp.std.c Subject: Is va_list defined by <stdio.h>? Message-ID: <16863@hoptoad.uucp> Date: 5 Apr 91 21:47:08 GMT Organization: Cygnus Support, Palo Alto Lines: 26