On Thu, Feb 24, 2005 at 03:14:21AM +0900, Steven Jenkins wrote:
> This is perfectly legal C. There's nothing special about main() except 
> that the loader uses it as the entry point. Any other function can call 
> it, including itself.
> 
> The argc in question is nonnegative by convention only. Someone could 
> just make a mistake and call it with the wrong argument.

5.1.2.2.1 Program startup

2 If they are declared, the parameters to the main function shall obey the
following constraints:

- The value of argc shall be nonnegative.

The standard is a little ambiguous, in that it does not specify whether
parameters must obey these constraints when calling main recursively,
but the way I read it, this is not legal.

As a side note, calling main recursively is legal in C but not in C++.

Paul