Turning off C++ casting?

Mongryong Mongryong@sympatico.ca
Thu Feb 20 17:26:00 GMT 2003


On Thu, 2003-02-20 at 07:54, Gabriel Dos Reis wrote:
> All this has nothing to do with GCC.
> 
> -- Gaby

Actually it does.  Each compiler vendor may implement the C++ spec
differently for what 'they believe' is best.  The dynamic_cast interface
actually takes a 'hint' value that helps in speeding up dynamic_casts. 
Some special values for this hint parameter are:
-1: no hint
-2: src is not a public base of dst
-3: src is a multiple public base type but never a virtual base type

This is taken directly from ABI doc at
http://www.codesourcery.com/cxx-abi/abi.html

That's why I was curious if GCC had a switch that when turned on
"assumes all dynamic casts will work" as oppose to "doing a unnecessary
checking algorithm". 



More information about the Gcc mailing list