Unable to use dynamic_cast (no RTTI)

Bug #1247335 reported by Edward Bart
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cheerp
Fix Released
High
Unassigned

Bug Description

class A { public: virtual ~A() {} };
class B : public A { public: virtual ~B() {} };
A *a = dynamic_cast<B*>(new A);

HelloClient.cpp:61:12: error: cannot use dynamic_cast with -fno-rtti
    A *a = dynamic_cast<B*>(new A);

RTTI is disabled by default, is possible to enable it somehow? I want to port some codes in duetto however I need RTTI.

Revision history for this message
Alessandro Pignotti (a-pignotti) wrote :

Unfortunale RTTI is currently not supported. I've a partial solution for single inheritance cases but still need to fix multiple inheritance. That would only left out virtual inheritance which is currently unsupported anyway.

Changed in duetto:
status: New → Confirmed
importance: Undecided → High
Changed in cheerp:
status: Confirmed → Fix Committed
Changed in cheerp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.