Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Sep 1998 20:32:47 -0400
From:      Tim Vanderhoek <ac199@hwcn.org>
To:        Garrett Wollman <wollman@khavrinen.lcs.mit.edu>, Charles Youse <cyouse@artemis.syncom.net>
Cc:        Dusk Auriel Sykotik <syko@sykotik.org>, chat@FreeBSD.ORG
Subject:   Re: Where can I find C
Message-ID:  <19980906203247.B1058@zappo>
In-Reply-To: <199809060156.VAA21373@khavrinen.lcs.mit.edu>; from Garrett Wollman on Sat, Sep 05, 1998 at 09:56:43PM -0400
References:  <Pine.LNX.3.95.980905200113.30275A-100000@vortex.starix.net> <Pine.NEB.3.96.980905204054.25315A-100000@artemis.syncom.net> <199809060156.VAA21373@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 05, 1998 at 09:56:43PM -0400, Garrett Wollman wrote:
> 
> Mr. Whazisname is correct.  Standard C does not permit variadic
> functions to be called without a declaration in scope.  The minimal
> hello, world program in C would be:
> 
> ------------------------------------
> int printf(const char *, ...); /* supply correct prototype */
> int
> main(void) /* as a special exception, main is allowed to take no args */

Isn't defaulting main() to return int legit (although not
recommended), too?

[So long as we're being pedantic and minimal].


> I don't recall whether a non-prototype declaration is permitted for
> variadic functions.  I think it is, but would not be surprised to see
> non-prototype declarations dropped completely from C 99.

Same with the default return of int.   :)


-- 
This .sig is not innovative, witty, or profund.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980906203247.B1058>