Question about EH

Tom Tromey
Wed Feb 23 13:55:00 GMT 2000

>>>>> "Martin" == Martin v Loewis <> writes:

Martin> Therefore, to catch exceptions thrown in Java, you need to put
Martin> a C++ typeinfo into the exception info. I'm not sure whether
Martin> the C++ compiler generates proper typeinfos for 'extern
Martin> "Java"' classes; that also may need some work.

It does not.  In fact, you have to compile native methods (written in
C++) with -fno-rtti.

I don't know why this decision was made.  I definitely don't know all
the issues.

Martin> Of course, it may be possible to adjust everything the other way
Martin> 'round, ie. treat throw and catch in C++ specially if that is an
Martin> extern "Java" type.

That's the approach I'm currently taking, because I understand it.
If that doesn't work out, then I guess I'll have to find a way to get
the time to understand a much larger piece of the C++ compiler.


More information about the Gcc mailing list