Signedness of wchar_t and wint_t leads to problems with gcc -Wsign-conversion
Andreas Schwab
schwab@suse.de
Mon Nov 21 13:01:00 GMT 2016
On Nov 21 2016, "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> wrote:
> So, I'm not quite clear on the point that you are making in your
> second point. Given code such as:
>
> wchar_t w;
> ...
> if (iswlower((wint_t) w) ....
>
> Do you mean that the standards are saying that casting to wint_t here
> is guaranteed to be correct? I can't see the line of reasoning that
> leads there.
Any valid value of wchar_t is representable by wint_t. I cannot find
any more convincing argument.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Libc-alpha
mailing list