unsigned char vs. signed char

Haïkel hguemar at fedoraproject.org
Tue Jul 15 16:55:40 UTC 2014


According the standard, char is supposed to be a distinct type from
signed/unsigned char.
btw, most commonly-used compilers (gcc, msvc, etc.) does use these
defaults, but you can't even assume that for every compilers.
If one wants to check the signedness of char, she could check CHAR_MIN
is equal to zero or SCHAR_MIN (from limits.h)

Regards,
H.


More information about the devel mailing list