Article View: comp.std.c
Article #3135Re: <varargs.h> vs. function prototypes
From: Doug Gwyn
Date: Thu, 13 Jun 1991 16:56
Date: Thu, 13 Jun 1991 16:56
21 lines
1481 bytes
1481 bytes
In article <25353@oolong.la.locus.com> scotte@locus.com (Scott D. Eberline) writes: >I'm a bit resigned to having missing prototype warnings for the module >that contains the function definitions. As you have discovered, there is no correct way to use prototypes for <varargs.h>-style variadic functions (when they are supported at all). You ought to simply use the empty-parenthesis (old style) form of declaration for such functions. By the way, I take exception to the implementation warning you that no prototypes exists, unles you have specifically asked for that check. The C standard does not require that prototypes be used. >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? The answer to the second question is "Certainly, and indeed it is likely." Therefore the answer to the first question is that it is not a good idea.
Technical Details
Message-ID:
<16405@smoke.brl.mil>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!sdd.hp.com!wuarchive!psuvax1!hsdndev!cmcl2!adm!smoke!gwynReferences:
<25353@oolong.la.locus.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!sdd.hp.com!wuarchive!psuvax1!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: <varargs.h> vs. function prototypes Message-ID: <16405@smoke.brl.mil> Date: 13 Jun 91 16:56:49 GMT References: <25353@oolong.la.locus.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 21