From owner-cvs-all Mon May 28 6:28:53 2001 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 00E3037B43C; Mon, 28 May 2001 06:28:44 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id XAA28711; Mon, 28 May 2001 23:23:29 +1000 Date: Mon, 28 May 2001 23:21:57 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Peter Pentchev Cc: Sheldon Hearn , Dima Dorfman , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/jot Makefile jot.c In-Reply-To: <20010528150415.H588@ringworld.oblivion.bg> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 28 May 2001, Peter Pentchev wrote: > On Mon, May 28, 2001 at 02:59:44PM +0300, Peter Pentchev wrote: > > On Mon, May 28, 2001 at 09:43:58PM +1000, Bruce Evans wrote: > > > On Mon, 28 May 2001, Sheldon Hearn wrote: > > > > Since when do you have to add a prototype for main()?! > > > > > > Since -Wmissing-prototypes was added to CFLAGS (by WARNS=2 or BDECFLAGS) > > > ... > > > gcc shouldn't warn about main() not being prototyped before it is > > > defined even with -Wmissing-prototypes, but it currently warns about > > > it if the definition is old-style. gcc -ffreestanding also seems to > > > ... > > > > In this case, gcc is not complaining about main() not being prototyped, > > and it's not complaining because of -Wmissing-prototypes. Rather, it's > > -Wstrict-prototypes that's making it whine, because of a K&R declaration > > without a previous prototype. It whines about 'function declaration > > is not a prototype', not about a missing prototype. > > (though yes, I agree that if main() is special in other cases, it should > maybe be made special for the strict-prototypes check, too.) It already is suitably special according to what you said above. I no longer completely agree with what I said should happen above. main() might be called recursively from other source files. If it is abused like that, then it should be prototyped. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message