[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix u32toutf8 so it encodes values > 0xFFFF correctly.

From: Linda Walsh
Subject: Re: Fix u32toutf8 so it encodes values > 0xFFFF correctly.
Date: Wed, 22 Feb 2012 14:01:15 -0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20100228 Lightning/0.9 Thunderbird/ Mnenhy/

Eric Blake wrote:

On 02/22/2012 05:19 AM, Linda Walsh wrote:

Eric Blake wrote:

Not only can wchar_t can be either signed or unsigned, you also have to
worry about platforms where it is only 16 bits, such as cygwin; on the
other hand, wint_t is always 32 bits, but you still have the issue that
it can be either signed or unsigned.

What platform uses unsigned wide ints?  Is that even posix compat?

Yes, it is posix compatible to have wint_t be unsigned.  Not only that,
but both glibc (32-bit wchar_t) and cygwin (16-bit wchar_t) use a 32-bit
unsigned int for wint_t.  Any code that expects WEOF to be less than 0
is broken.

        I never had any question that wchar_t could be signed or

        My question had to do with an unqualified wint_t not
unsigned wint_t and what platform existed where an 'int' type or
wide-int_t, was, without qualifiers, unsigned.  I still would like
to know -- and posix allows int/wide-ints to be unsigned without
the unsigned keyword?

That seems very confusing.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]