Calling conventions are as much a standard as the C spec.
The main() is called like a regular function, by the system thing that executes programs.
Depending on the compiler and the flags, the main() is not the real entry point of the program. It can add another entry point to do some magic, like setting the return code.
The main() is called like a regular function, by the system thing that executes programs.
Depending on the compiler and the flags, the main() is not the real entry point of the program. It can add another entry point to do some magic, like setting the return code.