Xref: utzoo comp.lang.c:15989 comp.sys.ibm.pc:24165 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!3comvax!bridge2!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: using floats in functional prototypes Message-ID: <945@auspex.UUCP> Date: 4 Feb 89 00:07:14 GMT References: <1989Jan18.092522.14499@gpu.utcs.toronto.edu> <942@ubu.warwick.UUCP> <11556@haddock.ima.isc.com> <992@ubu.warwick.UUCP> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 35 >>I see no reason to make such an exception. If you've got prototypes, use >>them for both declarations and defintions, whether or not the function takes a >>positive number of arguments. In particular, >> int main(void) { return 0; } >>is perfectly correct. The old style (without `void') is obsolescent. > >Well I don't know what the dpANS says about this,... The dpANS most definitely says that int foo(void) { return 0; } is perfectly correct. It doesn't come right out and say that the old style (without `void') is obsolescent; however, the May 13, 1988 draft says that an implementation may generate a warning if "a function is called but no prototype has been specified". This sounds to me as if they don't think that old-style definitions are the Right Way To Go; it sounds as if they think they're kept around for backwards compatibility and should not be used in new code. >Maybe its a bug in QuickC, It most definitely *is* a bug in QuickC if it can't cope with int foo(void) { ... } and it purports to match some draft of the pANS. If it doesn't purport to match any draft of the pANS, it's simply a horrible misfeature.