Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/bin/echo
On Wed, Nov 10, 2021 at 17:35:45 +0000, Robert Elz wrote:
> And second, does C99 really promise:
> Remove unnecessary call to exit(0); returning from main is equivalent
> since C99.
> in the sense that simply falling out of main() is exit(0)?
Surprisingly - yes.
Derek M. Jones in his "The New C Standard. An Economic and Cultural
Commentary." notes about the relevant passage in the standard text:
5.1.2.2.3 Program termination
[...]
reaching the } that terminates the main function returns a value of 0.
Commentary
The standard finally having to bow to sloppy existing practices.
I'd say the previous change to take advantage of this was profoudly
misguided.
-uwe
Home |
Main Index |
Thread Index |
Old Index