F
Flash Gordon
Harald van Dijk wrote, On 01/07/07 17:52:
It effectively prohibits it on implementations that do not document
other return types and for programs which are meant to be portable.
Personally I've yet to see an argument for using a return type of other
than int that is strong enough to make me ever want to use it or think
that suggesting it is a good idea. Yes, I have seen the arguments about
unreachable code (and warnings there of) etc, I just don't think they
are strong enough to warrant even a small loss of portability.
This is incorrect. The C standard requires implementations to accept main
returning int, but does not prohibit other return types either from being
allowed by implementations or from being used by programs.
It effectively prohibits it on implementations that do not document
other return types and for programs which are meant to be portable.
Personally I've yet to see an argument for using a return type of other
than int that is strong enough to make me ever want to use it or think
that suggesting it is a good idea. Yes, I have seen the arguments about
unreachable code (and warnings there of) etc, I just don't think they
are strong enough to warrant even a small loss of portability.