This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libjava test suite keeps getting stuck
Richard Henderson wrote:
> On Thu, Apr 19, 2001 at 10:41:25PM -0700, Zack Weinberg wrote:
> > __gxx_personality_v0 is another can of worms entirely. It looks to be
> > referenced from all of the C++ source code. It's deeply involved with
> > the new exception handling scheme. I do not know whether it's
> > appropriate to keep using the C++ version or whether java should have
> > its own.
>
> Java does have its own -- __gcj_personality_v0.
>
> The problem at the moment is that the c++ front end uses the existance
> of a throw or a catch of a Java object to determine that we should be
> emulating Java exception handling in this module. We really ought to
> be using a pragma instead so that it is (1) affirmative and (2) works
> with only cleanups present.
I'm not sure why a #pragma would make a difference in this case. My
understanding is that currently, Java exceptions will be used for the
entire module if the object being thrown is an extern "java" and extends
java.lang.Throwable, so that doesn't explain why __gxx_personality_v0 is
being referenced from the C++ parts of libjava, unless there are places
that really are throwing or catching non-Java exceptions.
Also, I'm not really up to speed on the issues here, but isn't it
conceivable that a module would want to use both C++ and Java exception
semantics? For example, to catch a C++ exception thrown from a C++ library
in one function but to throw a Java exception back to some Java code in
another?
regards
[ bryce ]