🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3134

<varargs.h> vs. function prototypes

#3134
From: Scott D. Eberline
Date: Wed, 12 Jun 1991 22:43
23 lines
1522 bytes
For software that may potentially be ported to platforms not yet
ANSI-compliant, some functions taking variable arguments are
defined using <varargs.h> instead of <stdarg.h>.  I would like
to declare full prototypes for these to avoid compiler warnings
about missing prototypes.  In the module in which these functions
are defined, this doesn't seem to be possible:

1.  prototypes using the ellipsis notation for variable argument lists 
don't match varargs-style function definitions;

2.  because of the built-in semicolon, prototypes can't contain va_dcl.

I'm a bit resigned to having missing prototype warnings for the module
that contains the function definitions.  I'd still like to have
prototypes in all the other modules, and the ellipsis notation
seems to be the only way to do this.

How dangerous is it to call functions declared externally using the
ellipsis notation, but defined using va_dcl?  May a conforming implement-
ation assume that functions with ellipsis prototypes use <stdarg.h>-style
arguments and not <varargs.h>-style?
-- 
Scott D. Eberline			scotte@locus.com  or  lcc!scotte
Technical Details
Message-ID: <25353@oolong.la.locus.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!turnkey!orchard.la.locus.com!prodnet.la.locus.com!scotte

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!turnkey!orchard.la.locus.com!prodnet.la.locus.com!scotte
From: scotte@locus.com (Scott D. Eberline)
Newsgroups: comp.std.c
Subject: <varargs.h> vs. function prototypes
Message-ID: <25353@oolong.la.locus.com>
Date: 12 Jun 91 22:43:53 GMT
Distribution: na
Lines: 23