Michael T. Babcock wrote:
>I don't see how "If there is ever a compiler dumb enough to break void
>main(), I will happily advise everyone to use a different compiler"
>engenders any trust in someone's ability to write C code.
>
>Qmail is well written, sure.  But void main() is and always has been wrong
>on 99% of platforms and adding "return 0;" to the end of the function will
>shut up GCC as well.  That said ...

void main() does NOT shut recent versions of gcc up, unless you specify
-Wno-main.

> cat void.c
void main() {}
> gcc void.c 
void.c: In function `main':
void.c:1: warning: return type of `main' is not `int'

Was there a problem with int main() that was giving people trouble?

Mark

-- 
Do not reply directly to this e-mail address
--
Mark Mentovai
UNIX Engineer
Gillette Global Network

Reply via email to