I think this rule of thumb not so much applies to callling exit()
instead, but to fall off main()
without returning anything, relying on the implicit return 0
the run-time system has to do in that case.
I guess that main()
is the only function returning a value where you can omit explicitly returning a value. IMO that's a very good reason to not to rely on that rule.