Article View: comp.std.c
Article #1851Re: prototypes required ?
From: Paul D. Smith
Date: Wed, 17 Oct 1990 14:30
Date: Wed, 17 Oct 1990 14:30
29 lines
1593 bytes
1593 bytes
[] Is it legal for a compilation system to require prototypes when stdarg
[] functions are used ?
The thing you need to remember is that, in the definition of the
stdarg package, each function *must* have at least the first argument
defined; i.e., you cannot declare a function as:
int my_func( ... );
You must have at least one argument (see K&R II, Sec B7, p 254). So,
if you are going to add the "..." construct you must declare a
prototype for the first argument.
I see no reason you could just not prototype anything, however:
int printf();
This should cause no problems.
--
paul
-----
------------------------------------------------------------------
| Paul D. Smith | pds@lemming.webo.dg.com |
| Data General Corp. | |
| Network Services Development | "Pretty Damn S..." |
| Open Network Applications Department | |
------------------------------------------------------------------
Technical Details
Message-ID:
<PDS.90Oct17103016@lemming.webo.dg.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!dg!fs06!pdsReferences:
<4026@otis.oakhill.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!dg!fs06!pds From: pds@lemming.webo.dg.com (Paul D. Smith) Newsgroups: comp.std.c Subject: Re: prototypes required ? Message-ID: <PDS.90Oct17103016@lemming.webo.dg.com> Date: 17 Oct 90 14:30:16 GMT References: <4026@otis.oakhill.UUCP> Sender: root@dg.dg.com Organization: NSDD/ONAD, Data General Corp., Westboro, MA Lines: 29 In-reply-to: jeff@oakhill.UUCP's message of 16 Oct 90 16:58:10 GMT