Travis Vitek wrote:
Travis Vitek commented on STDCXX-742:
-------------------------------------

This is happening because we don't use the -qrtti=dynamiccast option. We internally use a dynamic_cast to determine if the facet is of the correct derived type, but if dynamic_cast isn't supported we use a C style cast, and that returns bad results.

This case is essentially the same as STDCXX-664. We didn't add -qrtti=dynamiccast back then, and we just worked around the issue in the test. It seems to me that we should have added the flag. Would this be a binary compatible change?


What are the thoughts on this? There was some discussion
[http://tinyurl.com/3xfdma] of enabling -qrtti=dynamiccast for the
VisualAge C++ compiler, but it petered out.

Is there any way to turn on rtti using a pragma? That way we could
enable it only for translation units that included <locale> and we
wouldn't be shoving the option down the throats of users who don't
care about named locales.

Btw., does XLC++ itself correctly handle the test case mentioned
in the thread, even without -qrtti? (It's possible to get some
simple cases to work even w/o the option but not all of them).

Martin

Reply via email to