The stdint.h header defines integer types, limits of specified
width integer types, limits of other integer types, and macros for
integer constant expressions.
Note: For the exact width integer types, minimum-width integer
types, limits of specified width integer types, and exact width integer
constants, bit sizes N with the values 8, 16, 32, and 64
are supported.
Requirement: Use of the bit size 64 and
greatest-width integer types or macros require LP64 or the long long
data type to be available.
Integer types
The following exact width integer types are defined.
The following minimum-width integer types are defined.
- int_leastN_t
- uint_leastN_t
The following fastest minimum-width integer types are defined.
These types are the fastest to operate with among all integer types
that have at least the specified width.
The following greatest-width integer types are defined. These types
hold the value of any signed/unsigned integer type.
Note: Requires
long long to be available.
The following integer types capable of holding object pointers
are defined.
Object-like macros for limits of integer types:
Macros for limits of exact width integer types.
- INTN_MAX
- INTN_MIN
- UINTN_MAX
Macros for limits of minimum width integer types.
- INT_LEASTN_MAX
- INT_LEASTN_MIN
- UINT_LEASTN_MAX
Macros for limits of fastest minimum width integer types.
- INT_FASTN_MAX
- INT_FASTN_MIN
- UINT_FASTN_MAX
Macros for limits of greatest width integer types.
- INTMAX_MAX
- INTMAX_MIN
- UINTMAX_MAX
Macros for limits of pointer integer types.
- INTPTR_MAX
- INTPTR_MIN
- UINTPTR_MAX
Macros for limits of ptrdiff_t.
Macro for limit of size_t.
Function-like macros for integer constants:
Macros for minimum width integer constants.
- INTN_C(value)
- UINTN_C(value)
Macros for greatest-width integer constants:
- INTMAX_C(value)
- UINTMAX_C(value)