Subject: Re: main return...
To: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
From: Erik M. Theisen <email@example.com>
Date: 03/28/1996 19:24:22
>It can't be quite that simple, since there are _two_ allowed types for
>main. (Specifically, int (*)(void) and int (*)(int, char **).) Thus,
>no single prototype can be correct; it would have to be special-cased.
Maybe this is compiler specific, but there is also a:
int main(int argc, char **argv, char **envp)
The third param is the exec's environment vars.
Does the standard really say "void main(void)" or
"void main(int argc, char**argv) is a nogo? This seems wierd.
If it's return type was void, I would expect crt0 to set the exec
return value to NULL to statisfy the OS.