This might throw up some bugs too. Compilers often add code before and after the entry point (this is why you need to call exit() - the compiler usually provides that and passes the return of main to it). It's possible that some initialisation code could be missed and this could possible cause some problems with various libraries you are using or even maybe lead to a crash. Who knows - it's not standard so anything's feasible