exceptions and RTTI and mixed code

Joe Buck jbuck@synopsys.com
Sat Apr 4 20:05:00 GMT 1998


> I'm not sure this has been asked.  I'm unofficially helping integrate egcs
> into NetBSD, and I'd like to know if gcc 2.8/egcs can handle mixing code
> with exceptions and RTTI (as by default) and code without it can be mixed.
> The libstdc++ is built as a shared library, so it obviously can only be one
> or the other, not both.  So, if it has RTTI and exceptions compiled in, can
> user code be linked to it without using RTTI and exceptions?

The answer is supposed to be yes: if you build libstdc++ in the normal
way, you can link code to it that has -fno-exceptions and -fno-rtti.
However, *don't* try to build libstdc++ without those flags; you'll
have trouble.

(I say "supposed to be" because I can't guarantee that there is no
platform-specific bug somewhere, but it should work).





More information about the Gcc mailing list