C++ Logo

std-proposals

Advanced search

Re: [std-proposals] D3803R0 More standard forms of main

From: Thiago Macieira <thiago_at_[hidden]>
Date: Tue, 22 Jul 2025 09:57:20 -0700
On Tuesday, 22 July 2025 09:33:38 Pacific Daylight Time Brian Bi via Std-
Proposals wrote:
> > Also, "void main()" is still magical, perhaps more so, because it returns
> > EXIT_SUCCESS.
>
> I don't think we have to teach people that `void main()` "returns
> `EXIT_SUCCESS`". Observing the return code of `main` is not a beginner
> topic.

It could simply be said that a `void main()` program will have a successful
exit, unless one of the runtime exit functions are called.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Platform & System Engineering

Received on 2025-07-22 16:57:26