|
Integer types having exactly the specified width
|
typedef signed char | int8_t |
|
typedef unsigned char | uint8_t |
|
typedef signed int | int16_t |
|
typedef unsigned int | uint16_t |
|
typedef signed long int | int32_t |
|
typedef unsigned long int | uint32_t |
|
typedef signed long long int | int64_t |
|
typedef unsigned long long int | uint64_t |
|
|
Types designating integer data capable of representing any value of any integer type in the corresponding signed or unsigned category
|
typedef int64_t | intmax_t |
|
typedef uint64_t | uintmax_t |
|
|
C++ implementations should define these macros only when __STDC_CONSTANT_MACROS is defined before <stdint.h> is included.
These definitions are valid for integer constants without suffix and for macros defined as integer constant without suffix
|
#define | INT8_C(value) ((int8_t) value) |
|
#define | UINT8_C(value) ((uint8_t) __CONCAT(value, U)) |
|
#define | INT16_C(value) value |
|
#define | UINT16_C(value) __CONCAT(value, U) |
|
#define | INT32_C(value) __CONCAT(value, L) |
|
#define | UINT32_C(value) __CONCAT(value, UL) |
|
#define | INT64_C(value) __CONCAT(value, LL) |
|
#define | UINT64_C(value) __CONCAT(value, ULL) |
|
#define | INTMAX_C(value) __CONCAT(value, LL) |
|
#define | UINTMAX_C(value) __CONCAT(value, ULL) |
|
Use [u]intN_t if you need exactly N bits.
Since these typedefs are mandated by the C99 standard, they are preferred over rolling your own typedefs.
#define INT16_C |
( |
|
value | ) |
value |
define a constant of type int16_t
largest positive value an int16_t can hold.
smallest negative value an int16_t can hold.
#define INT32_C |
( |
|
value | ) |
__CONCAT(value, L) |
define a constant of type int32_t
#define INT32_MAX 0x7fffffffL |
largest positive value an int32_t can hold.
smallest negative value an int32_t can hold.
#define INT64_C |
( |
|
value | ) |
__CONCAT(value, LL) |
define a constant of type int64_t
#define INT64_MAX 0x7fffffffffffffffLL |
largest positive value an int64_t can hold.
smallest negative value an int64_t can hold.
#define INT8_C |
( |
|
value | ) |
((int8_t) value) |
define a constant of type int8_t
largest positive value an int8_t can hold.
smallest negative value an int8_t can hold.
largest positive value an int_fast16_t can hold.
smallest negative value an int_fast16_t can hold.
largest positive value an int_fast32_t can hold.
smallest negative value an int_fast32_t can hold.
largest positive value an int_fast64_t can hold.
smallest negative value an int_fast64_t can hold.
largest positive value an int_fast8_t can hold.
smallest negative value an int_fast8_t can hold.
largest positive value an int_least16_t can hold.
smallest negative value an int_least16_t can hold.
largest positive value an int_least32_t can hold.
smallest negative value an int_least32_t can hold.
largest positive value an int_least64_t can hold.
smallest negative value an int_least64_t can hold.
largest positive value an int_least8_t can hold.
smallest negative value an int_least8_t can hold.
#define INTMAX_C |
( |
|
value | ) |
__CONCAT(value, LL) |
define a constant of type intmax_t
largest positive value an intmax_t can hold.
smallest negative value an intmax_t can hold.
largest positive value an intptr_t can hold.
smallest negative value an intptr_t can hold.
largest positive value a ptrdiff_t can hold.
smallest negative value a ptrdiff_t can hold.
largest positive value a sig_atomic_t can hold.
smallest negative value a sig_atomic_t can hold.
largest value a size_t can hold.
#define UINT16_C |
( |
|
value | ) |
__CONCAT(value, U) |
define a constant of type uint16_t
#define UINT16_MAX (__CONCAT(INT16_MAX, U) * 2U + 1U) |
largest value an uint16_t can hold.
#define UINT32_C |
( |
|
value | ) |
__CONCAT(value, UL) |
define a constant of type uint32_t
#define UINT32_MAX (__CONCAT(INT32_MAX, U) * 2UL + 1UL) |
largest value an uint32_t can hold.
#define UINT64_C |
( |
|
value | ) |
__CONCAT(value, ULL) |
define a constant of type uint64_t
#define UINT64_MAX (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL) |
largest value an uint64_t can hold.
#define UINT8_C |
( |
|
value | ) |
((uint8_t) __CONCAT(value, U)) |
define a constant of type uint8_t
#define UINT8_MAX (__CONCAT(INT8_MAX, U) * 2U + 1U) |
largest value an uint8_t can hold.
largest value an uint_fast16_t can hold.
largest value an uint_fast32_t can hold.
largest value an uint_fast64_t can hold.
largest value an uint_fast8_t can hold.
largest value an uint_least16_t can hold.
largest value an uint_least32_t can hold.
largest value an uint_least64_t can hold.
largest value an uint_least8_t can hold.
#define UINTMAX_C |
( |
|
value | ) |
__CONCAT(value, ULL) |
define a constant of type uintmax_t
largest value an uintmax_t can hold.
largest value an uintptr_t can hold.
typedef signed long long int int64_t |
64-bit signed type.
- Note
- This type is not available when the compiler option -mint8 is in effect.
fastest signed int with at least 16 bits.
fastest signed int with at least 32 bits.
fastest signed int with at least 64 bits.
- Note
- This type is not available when the compiler option -mint8 is in effect.
fastest signed int with at least 8 bits.
signed int with at least 16 bits.
signed int with at least 32 bits.
signed int with at least 64 bits.
- Note
- This type is not available when the compiler option -mint8 is in effect.
signed int with at least 8 bits.
largest signed int available.
Signed pointer compatible type.
64-bit unsigned type.
- Note
- This type is not available when the compiler option -mint8 is in effect.
fastest unsigned int with at least 16 bits.
fastest unsigned int with at least 32 bits.
fastest unsigned int with at least 64 bits.
- Note
- This type is not available when the compiler option -mint8 is in effect.
fastest unsigned int with at least 8 bits.
unsigned int with at least 16 bits.
unsigned int with at least 32 bits.
unsigned int with at least 64 bits.
- Note
- This type is not available when the compiler option -mint8 is in effect.
unsigned int with at least 8 bits.
largest unsigned int available.
Unsigned pointer compatible type.