I got this error today in Visual Studio when building our game at work.
I was trying to go a harmless dynamic_cast to downcast and object to a derived object and was confronted with this problem. After looking up the error it seems that it can be made to go away by turning on RTTI which is something we do not want to do due to the overhead of it and we have our own reflection system anyway and the type information isn’t required from RTTI. The reason being that dynamic_cast makes use of typeid which is only available under RTTI enabled projects.
I could have done a static_cast but didn’t want to do this blindly. Also not being a fan of ‘unpredictable behaviour’ I instead had to resort to a old fashioned dangerous C-style cast e.g.
MyObject* pObj = (MyObject*)pObjectToCast;
This works fine, gets rid of the warning but I don’t like it.