News for hackers. Stuff that matters.
Re:F() vs. F(void) in C vs. C++ by Vogtinator on Monday May 13, 2019 @02:54AM (#19896859)
That's a special case though and unrelated to (). Like it's also explicitly allowed to omit a return statement in main altogether, which implies a return 0.
Re:F() vs. F(void) in C vs. C++ by kazinator on Tuesday May 14, 2019 @12:53AM (#19906864)
That was added in C99; previously, "falling off" the end of main without a return statement resulted in an indeterminate termination status. Countless sloppily written C programs had garbage termination statuses because of this, making it impossible for higher level programs (e.g. scripts) to reliably test for successful execution.