No. C allows the implementation(A C compiler) to create an internal integer type that is none of the standard integer types and alias that to (u)intX_t , using an implementation defined mechanism other than typedef.
Or it could use a typedef .e.g typedef __special_u8 uint8_t; where the particular compiler internally knows about __special_u8 and treats it differently from unsigned char.
Re:How to C in 2016
by julian-klode on Friday January 08, 2016 @06:58PM
(#10869246)
You could have types
__builtin_type_like_char_that_is_not_char
and
__builtin_type_like_uchar_that_is_not_uchar
There are no such things in the C Standard.
The standard provides for implementation-defined integer types. See my other comment: https://news.ycombinator.com/item?id=10868435
See also this suggestion that the gcc people, true to form, considered making uint8_t something other than unsigned char: https://news.ycombinator.com/item?id=10868953
In C, with CHAR_BIT defined as 8, unsigned char is the only type that satisfies the requirements of uint8_t.
( It is also possible that it is defined as char, if implementation defines char to have the same range, representation, and behavior as unsigned char. In this case, char effectively becomes unsigned char, but is still a distinct type. The types are compatible (can alias).)
Now why is unsigned char the only possibility. Type uint8_t is defined to have two'2 complement, have exactly 8 bits, no padding, and be unsigned. So we need an unsigned integer type. The unsigned type that follows unsigned char in rank is unsigned short char. But this type is defined to have ranges at least from 0 to 65535. Since CHAR_BIT is 8, unsigned short int cannot be used, because it has to have more than 8 bits. As there is no type in rank before unsigned char, it remains the only possibility.