aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@gcc.gnu.org>2001-11-28 07:40:12 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2001-11-28 07:40:12 +0000
commit861768350bcf5cfc23c7509e0f9f3df9621f429f (patch)
tree549f0f11dd8d8194af25dbfbe92e8ee5e2b7efc0
parent074a8e74dd46c76f91a97569539e3f35c80f8822 (diff)
downloadgcc-861768350bcf5cfc23c7509e0f9f3df9621f429f.zip
gcc-861768350bcf5cfc23c7509e0f9f3df9621f429f.tar.gz
gcc-861768350bcf5cfc23c7509e0f9f3df9621f429f.tar.bz2
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. From-SVN: r47402
-rw-r--r--libstdc++-v3/ChangeLog11
-rw-r--r--libstdc++-v3/config/locale/moneypunct_members_gnu.cc9
-rw-r--r--libstdc++-v3/config/locale/numpunct_members_gnu.cc4
3 files changed, 17 insertions, 7 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 369477e..5f74c2d 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
@@ -440,7 +449,7 @@
* 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.
diff --git a/libstdc++-v3/config/locale/moneypunct_members_gnu.cc b/libstdc++-v3/config/locale/moneypunct_members_gnu.cc
index 31662c2..88a4f95 100644
--- a/libstdc++-v3/config/locale/moneypunct_members_gnu.cc
+++ b/libstdc++-v3/config/locale/moneypunct_members_gnu.cc
@@ -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;
diff --git a/libstdc++-v3/config/locale/numpunct_members_gnu.cc b/libstdc++-v3/config/locale/numpunct_members_gnu.cc
index 1ebad42..5a423b5 100644
--- a/libstdc++-v3/config/locale/numpunct_members_gnu.cc
+++ b/libstdc++-v3/config/locale/numpunct_members_gnu.cc
@@ -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.