This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: patch: remaining -Wall warnings
- To: Benjamin Kosnik <bkoz@cygnus.com>
- Subject: Re: patch: remaining -Wall warnings
- From: Ulrich Drepper <drepper@cygnus.com>
- Date: 13 Aug 1999 14:47:26 -0700
- Cc: Michael Cook <cook@sightpath.com>, libstdc++@sourceware.cygnus.com
- References: <Pine.SOL.3.91.990813141333.8741A-100000@fencer.cygnus.com>
- Reply-To: drepper@cygnus.com (Ulrich Drepper)
Benjamin Kosnik <bkoz@cygnus.com> writes:
> This would seem to imply that long long might be a better choice, or
> wchar_t's that are int, and hosts that support an 8-byte long long. Hmm.
No, don't use long long. The purpose of wint_t is similar to int for
wide chars. I.e., the automatic promotion char->int when passing a
char to a function must be for wide chars wchar_t->wint_t.
The standard requirement that all chars plus EOF can be represented is
easy to fulfill with a normal unsigned long (or long). The standard
only requires that the ASCII chars can be presented. For most
implementations the encoding is UCS4 and then it still works since
0xffffffff is a value with bit 31 set, which is no legal UCS4 value.
Do not change any types. If there are comparisons with negative
values either correct the code or use casts.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------