This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: -fno-rtti and exception handling
- To: martin at loewis dot home dot cs dot tu-berlin dot de
- Subject: Re: -fno-rtti and exception handling
- From: Mike Stump <mrs at windriver dot com>
- Date: Thu, 16 Mar 2000 13:56:05 -0800 (PST)
- Cc: gcc-bugs at gcc dot gnu dot org
> Date: Thu, 16 Mar 2000 20:39:32 +0100
> From: "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>
> To: mrs@windriver.com
> Can you please elaborate somewhat? I guess it is not possible to mix
> objects that where compiled with -fno-rtti, and some that are, then?
That is correct. If one ensured that all throws and catches were of
the same kind (-frtti or -fno-rtti), then everything would work.
Think of a large project, with one subsystem in one style, and the
other one in the other style and they don't interoperate or
communicate directly, but instead go through a plain C style
interface. That is what was designed to work. I didn't try and unify
the strings with the rtti information and do anything (other than
fault).
> Because there is no mechanism for telling whether you have a char*
> or a type_info*, right?
Right.
> It seems that you'd then need a different library entry instead of
> __cp_push_exception, to put a different matcher function into the
> exception info. Is that assumption correct?
There is a different matcher, I quoted it in my last email. Yes, one
could have another __cp_push_exception function, call it, and have it
use the old matcher instead of the rtti matcher.