Is it possible for int_least16_t to be an alias for int rather than short?
从C99标准中,我可以看到int_least16_t保证具有至少16位的宽度。
7.18.1.2 Minimum-width integer types
...
The typedef name uint_leastN_t designates an unsigned integer type with a width of at least N , such that no unsigned integer type with lesser size has at least the specified width. Thus, uint_least16_t denotes an unsigned integer type with a width of at least 16 bits.
...
据我所知,该标准仅对类型的最小宽度进行了限制,而不一定对它们的等级进行限制。 因此,在int和short都具有16位宽度的体系结构上,尽管short的等级较低,int_least16_t是否可能是int的别名?
From what I can tell, the standard only puts restrictions on the
minimum width of the types, and not necessarily their rank. So on an
architecture where int and short both have a width of 16 bits, is it
possible that int_least16_t could be an alias for int, despite the
fact that short has lesser rank?
您已引用了该标准的所有相关文本。 是的,如果
实际上,如果实现仅支持64位整数,那么