diff options
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r-- | libstdc++-v3/src/c++11/localename.cc | 4 | ||||
-rw-r--r-- | libstdc++-v3/src/c++98/locale.cc | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libstdc++-v3/src/c++11/localename.cc b/libstdc++-v3/src/c++11/localename.cc index cde94ec..909cf4c 100644 --- a/libstdc++-v3/src/c++11/localename.cc +++ b/libstdc++-v3/src/c++11/localename.cc @@ -326,7 +326,9 @@ const int num_facets = ( _M_replace_categories(const _Impl* __imp, category __cat) { category __mask = 1; - if (!_M_names[0] || !__imp->_M_names[0]) + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 3676. Name of locale composed using std::locale::none + if (!_M_names[0] || (__cat != none && !__imp->_M_names[0])) { if (_M_names[0]) { diff --git a/libstdc++-v3/src/c++98/locale.cc b/libstdc++-v3/src/c++98/locale.cc index 3749408..0e7533e 100644 --- a/libstdc++-v3/src/c++98/locale.cc +++ b/libstdc++-v3/src/c++98/locale.cc @@ -323,7 +323,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION locale::_Impl:: _M_install_facet(const locale::id* __idp, const facet* __fp) { - if (__fp) + if (__builtin_expect(__fp != 0, 1)) { size_t __index = __idp->_M_id(); |