What is the difference between the int types int8_t, int_least8_t and int_fast8_t?
From the spec section 7.8.1.1 Exact-width integer types, paragraph 1:
The typedef name
intN_tdesignates a signed integer type with width N , no padding bits, and a two’s complement representation. Thus,int8_tdenotes a signed integer type with a width of exactly 8 bits.
And from: 7.18.1.2 Minimum-width integer types, paragraph 1:
The typedef name
int_leastN_tdesignates a signed integer type with a width of at least N, such that no signed integer type with lesser size has at least the specified width. Thus,int_least32_tdenotes a signed integer type with a width of at least 32 bits.
And finally from 7.18.1.3 Fastest minimum-width integer types, paragraph 2:
The typedef name
int_fastN_tdesignates the fastest signed integer type with a width of at least N. The typedef nameuint_fastN_tdesignates the fastest unsigned integer type with a width of at least N.