gratuitous gcc warnings: unused function arguments?

Erik Trulsson ertr1013 at student.uu.se
Tue Jan 18 05:29:33 PST 2005


On Tue, Jan 18, 2005 at 02:34:57PM +0600, Alexey Dokuchaev wrote:
> On Sun, Jan 16, 2005 at 04:41:13PM +0200, Giorgos Keramidas wrote:
> > 
> > This allows the main() function to keep being compliant with the ANSI
> > standard that specifies only two valid prototypes for main():
> > 
> > 	int main(void);
> > 	int main(int argc, char *argv[]);
> 
> Hmm, I might sound wrong, but I also recall seeing ``int main(int argc,
> char *argv[], char *envp[]);'' as valid main() prototype as well.

That is not correct according to the ANSI/ISO C standard.
It is a very common extension on Unix systems, but it is not standard C.


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at student.uu.se


More information about the freebsd-current mailing list