Hacker News new | past | comments | ask | show | jobs | submit login

Damn, you're right: Currently, “reaching the } that terminates the main function returns a value of 0”. In my defense, that was different in C89, which was the last one I worked on implementing and knew completely: “If the main function executes a return that specifies no value, the termination status returned to the host environment is undefined” and “Reaching the } that terminates a function is equivalent to executing a return statement without an expression.”



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: