RTTI bug

Philipp Tomsich phil@samhain.unix.cslab.tuwien.ac.at
Tue Dec 9 14:47:00 GMT 1997


There's what seems to be a bug in the RTTI-implementation of egcs-1.00.
Given the following code snippet:

{
class A {};
class B: public A {};

B  b;
A* ap = &b;
B* bp = dynamic_cast<B*>(ap);
}

This code snippet fails (compile-time error), although the Dec 96 Draft
Standard (Sec 5.2.7, p. 5-8 and 5-9) says it should work and assign &b to
bp. Apparently egcs attempts to check for type compliance statically and
thus fails.

Yours.
phil.






More information about the Gcc-bugs mailing list