bug report

Martin von Loewis martin@mira.isdn.cs.tu-berlin.de
Fri Nov 20 14:42:00 GMT 1998


> If you take out virtual from and change it to "class Derived: public
> Base {", it works.

This is not a bug. You can't reinterpret_cast to a different class and
expect it to work.

Instead, you can make the destructor of your virtual base class
virtual, and then dynamic_cast.

Regards,
Martin



More information about the Gcc-bugs mailing list