Tobias Pflug <[EMAIL PROTECTED]> writes:

> This will compile just fine. When compiled with -Wall it will at least
> bring up a warning about the missing return statement in foo(), nothing
> about main tho either. Or is there some standard that implicitly declares
> main to return 0 when there is no explicit return statement?

If the return value of a function is never used then it is perfectly valid
to fall through the end of it.  For main, the default action is to return
0 since C99.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Reply via email to