Re: gratuitous gcc warnings: unused function arguments?

From: Erik Trulsson <ertr1013_at_student.uu.se>
Date: Tue, 18 Jan 2005 14:29:30 +0100
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
Received on Tue Jan 18 2005 - 12:29:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:26 UTC