re PR libstdc++/64560 (building libstdc++ with -fno-rtti fails in new cxx11-shim...
authorJonathan Wakely <jwakely@redhat.com>
Mon, 12 Jan 2015 21:45:44 +0000 (21:45 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 12 Jan 2015 21:45:44 +0000 (21:45 +0000)
PR libstdc++/64560
* src/c++11/cxx11-shim_facets.cc (locale::facet::_M_sso_shim): Check
for RTTI support.

From-SVN: r219495

libstdc++-v3/ChangeLog
libstdc++-v3/src/c++11/cxx11-shim_facets.cc

index cd666d163d76a05105382494390ce4a4f29a5adf..55b2a24ea555211a0d9dd82a874ed51477ab77a0 100644 (file)
@@ -1,3 +1,9 @@
+2015-01-12  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/64560
+       * src/c++11/cxx11-shim_facets.cc (locale::facet::_M_sso_shim): Check
+       for RTTI support.
+
 2015-01-10  Thomas Schwinge  <thomas@codesourcery.com>
 
        * doc/xml/manual/parallel_mode.xml: Update for libgomp being
index 1a83e6cf13186ff976e21558c3d4b4bdf8276a0f..56959b6f87397b516cd6444b36a9582a96e8c418 100644 (file)
@@ -768,9 +768,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   {
     using namespace __facet_shims;
 
+#if __cpp_rtti
     // If this is already a shim just use its underlying facet.
     if (auto* p = dynamic_cast<const __shim*>(this))
       return p->_M_get();
+#endif
 
     if (which == &numpunct<char>::id)
       return new numpunct_shim<char>{this};