Mixing -frtti and -fno-rtti code in the same executable

Jonathan Lennox lennox@cs.columbia.edu
Tue Jan 27 16:41:00 GMT 2004


In one executable, is it safe to mix C++ object files compiled with -frtti
and -fno-rtti, assuming that objects instantiated in -fno-rtti sections
don't leak into code that uses typeid or dynamic_cast<>?

I'm porting a library of ours to the Sharp Zaurus, whose GUI libraries are
all compiled with -fno-exceptions -fno-rtti.  The code uses
boost::shared_ptr<>, however, which doesn't work without RTTI.  Am I going
to have to hack boost somehow, or can I get away with this?

Thanks.

-- 
Jonathan Lennox
lennox at cs dot columbia dot edu



More information about the Gcc-help mailing list