aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/config
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-28 07:40:12 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-28 07:40:12 +0000
commit8b7a88330206b3b50cff114429929d8e2765eaa3 (patch)
tree549f0f11dd8d8194af25dbfbe92e8ee5e2b7efc0 /libstdc++-v3/config
parent532fcd67cee2cf9b4c1356093e84c43b977e35dc (diff)
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47402 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/config')
-rw-r--r--libstdc++-v3/config/locale/moneypunct_members_gnu.cc9
-rw-r--r--libstdc++-v3/config/locale/numpunct_members_gnu.cc4
2 files changed, 7 insertions, 6 deletions
diff --git a/libstdc++-v3/config/locale/moneypunct_members_gnu.cc b/libstdc++-v3/config/locale/moneypunct_members_gnu.cc
index 31662c20d19..88a4f95a24a 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 1ebad42cdc8..5a423b50a78 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.