unsigned char -> unsigned int conversion
gwyn at BRL-VLD.ARPA
gwyn at BRL-VLD.ARPA
Sun Jun 17 12:44:35 AEST 1984
From: Doug Gwyn (VLD/VMB) <gwyn at BRL-VLD.ARPA>
Unsigned integer types are widened by adding zeros for the most significant
bits; i.e. they do not sign-extend. So coercing an unsigned char to an int
should not make it negative.
I have no idea if any of this is in the manual. Presumably the issue has
been dealt with in the ANSI committee. They are making noises about an
actual standard as soon as the end of 1985. (Hope, hope.)
More information about the Comp.unix.wizards
mailing list