[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Signedness issue in utf-8 code?



masarati@aero.polimi.it writes:
>> Now C90 compilers get to warn about long long instead.
>> With the new #if SIZEOF_WCHAR_T > 4, "if(wchar < (wchar_t)0x80000000UL)"
>> should be sufficient.
> 
> 0x80000000UL is == 0x80000000, as costants >= 0xffffffff are automatically
> promoted to unsigned.

True enough, but since the subject is killing harmless warnings: I've
seen warnings when the compiler decides to promote a constant without
'U' to unsigned.

-- 
Hallvard