Mail Archives: djgpp/1997/05/18/20:46:57
John M. Aldrich (fighteer AT cs DOT com) wrote:
: And, of course, add a "return 0;" at the end of main().
Is this strictly necessary? I was glancing through the ANSI standard the
other day (as one does) and it said that if main() reaches the end of the
function without encountering a return statement, it should assume a
return value of 0. Now gcc complains about this; is this non-compliance?
I still think it's a good idea to put a return in anyway, for the same
reason I prototype all my functions and assign them return types.
--
George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Merton College, Oxford
PS What should I do with the gold and platinum bars in dunnet? :)
- Raw text -