[ODE] Exception Handling
Simon Kolek
simon at bf2engine.com
Thu Feb 1 03:29:31 MST 2007
> Well, not with GCC 3.4.5 dwarf2-eh. How bad is VC++ implementation?
>
>
Very very bad :).
VC++ is very good in C++ exceptions code optimization. Typically -
exception code is moved away from function body.
Sample functions:
void TestFuncA()
{
try
{
printf( "aaaa" );
}
catch(...)
{
exit(-1);
}
}
void TestFuncB()
{
printf( "aaaa" );
}
----------------
VC++2k5 asm output( no differences):
PUBLIC ?TestFuncA@@YAXXZ ; TestFuncA
_TEXT SEGMENT
?TestFuncA@@YAXXZ PROC ; TestFuncA
push OFFSET ??_C at _04CLOGDNII@aaaa?$AA@
call DWORD PTR __imp__printf
pop ecx
ret 0
?TestFuncA@@YAXXZ ENDP ; TestFuncA
_TEXT ENDS
PUBLIC ?TestFuncB@@YAXXZ ; TestFuncB
_TEXT SEGMENT
?TestFuncB@@YAXXZ PROC ; TestFuncB
push OFFSET ??_C at _04CLOGDNII@aaaa?$AA@
call DWORD PTR __imp__printf
pop ecx
ret 0
?TestFuncB@@YAXXZ ENDP ; TestFuncB
_TEXT ENDS
B.R.
Simon
More information about the ODE
mailing list