This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Does --enable-clocale=gnu work on Linux/ia64?
- From: Ulrich Drepper <drepper at redhat dot com>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: gcc at gcc dot gnu dot org, hjl at lucon dot org
- Date: 25 Nov 2001 22:28:34 -0800
- Subject: Re: Does --enable-clocale=gnu work on Linux/ia64?
- References: <Pine.SOL.3.91.1011125221415.28154A-100000@taarna.cygnus.com>
- Reply-to: drepper at redhat dot com (Ulrich Drepper)
Benjamin Kosnik <bkoz@redhat.com> writes:
> > - _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));
> > + long int ch;
> > + ch = reinterpret_cast<long int>(__nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc));
> > + _M_decimal_point = (wchar_t) ch;
>
> C++ style casts, like static_cast<wchar_t>(ch);
>
> Looks ok to me. Uli?
I don't see why this should be a problem. The compiler shouldn't warn
about this. If you use reinterpret_cast you should be allowed to cast
from aa pointer to a narrower integer type.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------