Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

dynamic_cast metatroubles

vpozdyayev
Beginner
378 Views

Hi.

It appears that this report is, in fact, essentially ignored by Intel staff. Now, this is not exactly a priority issue (and I understand there are better places for this if it was), but still: am I missing something?

Let me try again: this code crashes when compiled with various combinations of ICC 12.1.5/13.0/13.1 + MSVC 2008/2012, with an std::__non_rtti_object exception showing up when debugged:

[cpp]class A { public: virtual void _dummy() { } }; class B: virtual public A { }; class C: virtual public A, public B { }; int main() { auto c = new C; auto a = dynamic_cast< A * >( c ); auto b = dynamic_cast< B * >( c ); auto ca = dynamic_cast< C * >( a ); // ok auto cb = dynamic_cast< C * >( b ); // std::__non_rtti_object return 0; }[/cpp]

----
Regards,
Vladimir 

0 Kudos
2 Replies
Brandon_H_Intel
Employee
378 Views

Hi Vladimir,

I updated the other thread with this as well, but I did reproduce this exception throw now, and I've submitted a problem report to our front-end team here.  When there's a status update, I'll update both threads.

0 Kudos
Brandon_H_Intel
Employee
378 Views

Hi Vladimir,

The original issue with a std::__non_rtti_object exception getting thrown is resolved in the latest 13.1 and 14.0 compilers (Intel(R) C++ Composer XE 2013 and 2013 SP1 products). Let me know if you have any further issues.

0 Kudos
Reply