This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RTTI problem


> "Folker Schamel" <schamel@spinor.com> writes:
> 
> > using gcc 3.2, it seems that dynamic_cast cannot cast to a
> > polymorophic class having no non-abstract virtual function.
> 
> I cannot reproduce this. Could you perhaps provide a complete,
> compilable test case? Ideally, to the GNATS bug tracking system, so it
> won't get lost.

Yes, the sample code of my last post works fine, sorry...
We tried around, but couldn't create a test case.... 

The problem occurred in a very large software,
joungling around with dynamic loaded libraries and much more.

The effect was the following:
declaring and implementing (overriding) a destructor made 
a dynamic_cast working which didn't work before.
(the top-most base class declares and defines a virtual destructor).
We tried to create a simple sample scenario using the same
library/module/dlopen structure, but couldn't reproduce the problem there.

If the base class of everything has a virtual destructor,
how can declaring and defining virtual destructors in
derived classes influence dynamic_cast?
I thought this should not be the case.
Do I oversee something?

Folker



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]