This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Alternative of dynamic_cast
- From: mramirez at iua dot upf dot es
- To: "Jyotirmoy Das" <Jyotirmoy_Das at infosys dot com>
- Cc: "Falk Hueffner" <falk dot hueffner at student dot uni-tuebingen dot de>, gcc-help at gcc dot gnu dot org
- Date: Fri, 2 Jan 2004 13:55:21 +0100 (CET)
- Subject: RE: Alternative of dynamic_cast
- References: <2B721C6525F0D411B1E900B0D0226BDD023EAAD7@mohmsg01.ad.infosys.com>
> Actually there is symbol resolution problem with dynamic_cast between gcc
> C++ runtime lib and libjvm. For this reason, my application crashes. The
> libjmv.so provided by IBM is compiled with gcc 2.95 and my application is
> running on gcc 2.96. I can't change libjvm or to downgrade the compiler
> version of my application. As a result, application dumps the core at
> runtime during the symbol resolution of dynamic_cast. So i need some
> alternative of that.
>
Well, if there is no possibility for the cast to fail - which can be quite
a risky assumption - you might try static_cast. However, as dynamic_cast
impl on the RH distribution of gcc-2.96 was quite broken, maybe
static_cast impl is also broken.
Good luck!
Miguel.