3 ms·
That's true, but it doesn't matter to the point being made. According to the standard[1], if short and int have the same size (even if not the same rank) both
by moefh 4y ago
That's true, but it doesn't matter to the point being made.
According to the standard[1], if short and int have the same size (even if not the same rank) both numbers are converted to unsigned int (that is, the unsigned integer type corresponding to int) because int can't represent all values of unsigned short.
The usual arithmetic conversions never "promote" an unsigned to signed if doing so would change the value.
[1] http://port70.net/~nsz/c/c99/n1256.html#6.3.1.8 http://port70.net/~nsz/c/c99/n1256.html#6.3.1.8