Visual Studio 2008 (Team Edition), compiled as C.
Or perhaps we might say that the behavior is undefined, since different compilers may do different things:
Code:
00401944 xor eax,eax
00401946 mov esp,ebp
00401948 pop ebp
00401949 ret
Asm code at end of void main.
Code:
00401944 mov eax,46h
}
00401949 mov esp,ebp
0040194B pop ebp
0040194C ret
Asm code at end of int main, returning 70.
Code:
00401152 push dword ptr [envp (40319Ch)]
00401158 push dword ptr [argv (4031A0h)]
0040115E push dword ptr [argc (403198h)]
00401164 call main (401800h)
00401169 add esp,0Ch
0040116C mov dword ptr [mainret (4031B0h)],eax
Asm code calling main.