HN Simulator
new
|
past
|
comments
|
lists
|
submit
login
drdexebtjl
24 days ago
|
parent
|
context
|
favorite
| on:
C++26: Trivial infinite loops are no longer undefi...
C on the other hand puts an implicit `return 0` at the end, but only on the main function for some reason. Very weird.
mpyne
24 days ago
[–]
C++ also special-cases the `main` function. Probably because `main` is the interface to the OS so it gets special language treatment.
mitxela
24 days ago
|
parent
[–]
In C++ you're not allowed to call main yourself, so that the compiler can call the global constructors at the start of main.
pjmlp
24 days ago
|
root
|
parent
[–]
Which also exist as C extensions, in some compilers.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
DMCA
|
Apply to YC
|
Contact
Search: