vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Thu, May 12, 2005 at 06:39:14PM +0200, Tobias Stoeckmann wrote: > In "The Open Group Base Specifications Issue 6" it is written, that exit > at the end of main should act like return. > (http://www.opengroup.org/onlinepubs/...ions/exit.html) They act very similiar because the CRT does something like the following: exit(main(argc, argv)) so returning from main is equivalent is to calling exit. The problem is that GCC or any other compiler can not know this and therefore it can't change the exit call into a return. The canary is only checked on function return, so it can't be checked here. Joerg |