This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: exceptions and RTTI and mixed code
- To: tv at pobox dot com (Todd Vierling)
- Subject: Re: exceptions and RTTI and mixed code
- From: Joe Buck <jbuck at synopsys dot com>
- Date: Sat, 4 Apr 98 17:07:03 PST
- Cc: egcs at cygnus dot com
> 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).