"Chris L. Mason" <[EMAIL PROTECTED]> writes:
> 
> Technically it's a bug.  main() should always return int...

Dan always calls _exit(stat), so main() _does_ return an integer,
regardless of the declaration.

> I always just assumed Dan was trying to make a statement of some
> kind as he certainly wouldn't have done this by mistake.  :)

In 1996, Dan said,

  ``In case anyone's curious: I use void main() because it shuts gcc
  up. If there is ever a compiler dumb enough to break void main(), I
  will happily advise everyone to use a different compiler.''

>From this we can infer that some version(s) of gcc, on some platform(s),
made a lot of noise over "int main()"; perhaps when it contains no
return statements. "void main()" works identically, with fewer complaints.

Len.

Reply via email to