This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Minor clean up to config/gnu/monetary
- From: Paolo Carlini <pcarlini at suse dot de>
- To: "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 28 Jun 2004 11:30:14 +0200
- Subject: [v3] Minor clean up to config/gnu/monetary
Hi,
consistently with numeric/time. Tested x86-linux, applied to mainline.
Paolo.
////////////////
2004-06-28 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/monetary_members.cc
(moneypunct<wchar_t>::_M_initialize_moneypunct): Clean up
assignments of _M_decimal_point and _M_thousands_sep.
diff -urN libstdc++-v3-orig/config/locale/gnu/monetary_members.cc libstdc++-v3/config/locale/gnu/monetary_members.cc
--- libstdc++-v3-orig/config/locale/gnu/monetary_members.cc 2004-04-16 11:23:05.000000000 +0200
+++ libstdc++-v3/config/locale/gnu/monetary_members.cc 2004-06-28 11:19:48.000000000 +0200
@@ -387,12 +387,12 @@
setlocale(LC_ALL, __name);
#endif
- union __s_and_w { const char *__s; unsigned int __w; } __u;
+ union { char *__s; wchar_t __w; } __u;
__u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
- _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
+ _M_data->_M_decimal_point = __u.__w;
__u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
- _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
+ _M_data->_M_thousands_sep = __u.__w;
_M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
_M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
@@ -529,12 +529,12 @@
setlocale(LC_ALL, __name);
#endif
- union __s_and_w { const char *__s; unsigned int __w; } __u;
+ union { char *__s; wchar_t __w; } __u;
__u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
- _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
+ _M_data->_M_decimal_point = __u.__w;
__u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
- _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
+ _M_data->_M_thousands_sep = __u.__w;
_M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
_M_data->_M_grouping_size = strlen(_M_data->_M_grouping);