🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5883

<stdarg.h> (requires <stdio.h>?)

#5883
From: Steve Summit
Date: Sun, 09 Apr 1989 03:41
25 lines
1307 bytes
The following fails to compile under Microsoft C version 5.1:

	#include <stdarg.h>

	warning(fmt)
	char *fmt;
	{
	va_list arg_ptr;
	va_start(arg_ptr, fmt);
	verror("warning", fmt, arg_ptr, 0);
	va_end(arg_ptr);
	}

because the va_end implementation sets arg_ptr to NULL, which
is nowhere defined.  This strikes me as a bug.  The synopsis
section of Microsoft's documentation for the va routines shows
<stdio.h> being #included (which would, of course, take care of
the problem), but I don't think I should have to.  What sayeth
the pANS?  I know it guarantees you can #include standard header
files multiple times (a desirable property), but does it ever say
you have to #include one before you can #include another?  (This
would not be desirable.)

                                            Steve Summit
                                            scs@adam.pika.mit.edu
Technical Details
Message-ID: <10447@bloom-beacon.MIT.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!adam.pika.mit.edu!scs

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!adam.pika.mit.edu!scs
From: scs@adam.pika.mit.edu (Steve Summit)
Newsgroups: comp.std.c
Subject: <stdarg.h> (requires <stdio.h>?)
Message-ID: <10447@bloom-beacon.MIT.EDU>
Date: 9 Apr 89 03:41:39 GMT
Sender: daemon@bloom-beacon.MIT.EDU
Reply-To: scs@adam.pika.mit.edu (Steve Summit)
Distribution: usa
Lines: 25