This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] wchar_t casts for ia64
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: jakub at redhat dot com
- Date: Tue, 27 Nov 2001 23:31:40 -0800
- Subject: [v3] wchar_t casts for ia64
- Organization: Red Hat/San Francisco
- Reply-to: bkoz at redhat dot com
Per discussion a day or two ago. Tested x86/linux.
-benjamin
2001-11-27 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.
Index: config/locale/moneypunct_members_gnu.cc
===================================================================
RCS file:
/cvs/gcc/gcc/libstdc++-v3/config/locale/moneypunct_members_gnu.cc,v
retrieving revision 1.4
diff -c -p -r1.4 moneypunct_members_gnu.cc
*** moneypunct_members_gnu.cc 2001/11/23 01:37:07 1.4
--- moneypunct_members_gnu.cc 2001/11/28 07:28:05
*************** namespace std
*** 319,326 ****
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_grouping = __nl_langinfo_l(GROUPING, __cloc);
mbstate_t __state;
--- 319,327 ----
else
{
// Named locale.
! _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;
*************** namespace std
*** 398,405 ****
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_grouping = __nl_langinfo_l(GROUPING, __cloc);
mbstate_t __state;
--- 399,406 ----
else
{
// Named locale.
! _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: config/locale/numpunct_members_gnu.cc
===================================================================
RCS file:
/cvs/gcc/gcc/libstdc++-v3/config/locale/numpunct_members_gnu.cc,v
retrieving revision 1.1
diff -c -p -r1.1 numpunct_members_gnu.cc
*** numpunct_members_gnu.cc 2001/08/28 06:19:33 1.1
--- numpunct_members_gnu.cc 2001/11/28 07:28:07
*************** namespace std
*** 77,84 ****
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_grouping = __nl_langinfo_l(GROUPING, __cloc);
}
// NB: There is no way to extact this info from posix locales.
--- 77,84 ----
else
{
// Named locale.
! _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.