im learning about integer conversion rank but i have a question, i often use the stdint.h library, and for what im reading about "integer conversion rank" it says:
"The rank of any standard integer type shall be greater than the rank of any extended integer type with the same size."
For what i know "int", for example, is an standard integer type, but using stdint.h i have the "int32_t" which is equal to "int"
I know that the stdint.h library uses "typedef" so theorically int and int32_t are equal, but i have read in forums that "extended integer types" uses the (u)intxx_t to be referred
So my question is, the "exact width integers" included in the stdint.h library are "standard integer types" or they are considered "extended integer types"?
Thanks for your answers!
Types listed in
stdint.h
are not necessarily extended integer types.Section 6.2.5 of the C standard defines extended integer types:
So the above states that extended integer types are implementation defined.
Section 7.20p4 describes the types defined in the stdint.h header:
So this states that the types in
stdint.h
are typedefs for other types. The critical part is footnote 261 which states:So whether or not the types in
stdint.h
are considered standard or extended integer types depends on what they are a typedef of.