2001-11-28 Benjamin Kosnik <bkoz@redhat.com>
authorBenjamin Kosnik <bkoz@gcc.gnu.org>
Wed, 28 Nov 2001 07:40:12 +0000 (07:40 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Wed, 28 Nov 2001 07:40:12 +0000 (07:40 +0000)
    Jakub Jelinek  <jakub@redhat.com>

* config/locale/moneypunct_members_gnu.cc
(moneypunct<wchar_t>::_M_initialize_moneypunct): Correctly cast
for ia64, others.
* config/locale/numpunct_members_gnu.cc
(numpunct<wchar_t>::_M_initialize_numpunct): Same.

From-SVN: r47402

libstdc++-v3/ChangeLog
libstdc++-v3/config/locale/moneypunct_members_gnu.cc
libstdc++-v3/config/locale/numpunct_members_gnu.cc

index 369477ef20c999fdeee82a47f5788e80ae5965da..5f74c2d50bd41db92e76c58503beaf5eba46274a 100644 (file)
@@ -1,3 +1,12 @@
+2001-11-28  Benjamin Kosnik  <bkoz@redhat.com>
+           Jakub Jelinek  <jakub@redhat.com>
+
+       * config/locale/moneypunct_members_gnu.cc
+       (moneypunct<wchar_t>::_M_initialize_moneypunct): Correctly cast
+       for ia64, others.
+       * config/locale/numpunct_members_gnu.cc
+       (numpunct<wchar_t>::_M_initialize_numpunct): Same.
+
 2001-11-27  Benjamin Kosnik  <bkoz@redhat.com>
 
        * include/bits/locale_facets.tcc: Formatting tweaks.
        * testsuite/21_strings/replace.cc (test02): Add test.
        * testsuite/21_strings/assign.cc (test01): New file.
        
-001-10-30  Jakub Jelinek  <jakub@redhat.com>
+2001-10-30  Jakub Jelinek  <jakub@redhat.com>
 
        * include/bits/stl_deque.h (_M_new_elements_at_front): Use
        __throw_exception_again.
index 31662c20d19f70a513b2d6223b50a8a130d68ddd..88a4f95a24abab3d6fad2034e8c768533f9bae72 100644 (file)
@@ -319,8 +319,9 @@ namespace std
       else
        {
          // Named locale.
-         _M_decimal_point = reinterpret_cast<wchar_t>(__nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc));
-         _M_thousands_sep = reinterpret_cast<wchar_t>(__nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC,__cloc));
+         _M_decimal_point = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
+
+         _M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
          _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
 
          mbstate_t __state;
@@ -398,8 +399,8 @@ namespace std
       else
        {
          // Named locale.
-         _M_decimal_point = reinterpret_cast<wchar_t>(__nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc));
-         _M_thousands_sep = reinterpret_cast<wchar_t>(__nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC,__cloc));
+         _M_decimal_point = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
+         _M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
          _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
 
          mbstate_t __state;
index 1ebad42cdc87b77172a46631351831d2cbb25f8d..5a423b50a780f20f3c8cecff00c65e571ea03771 100644 (file)
@@ -77,8 +77,8 @@ namespace std
       else
        {
          // Named locale.
-         _M_decimal_point = reinterpret_cast<wchar_t>(__nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc));
-         _M_thousands_sep = reinterpret_cast<wchar_t>(__nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC,__cloc));
+         _M_decimal_point = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
+         _M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
          _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
        }
       // NB: There is no way to extact this info from posix locales.