.TH ": Standard Integer Types" 3 "24 Jun 2019" "Version 2.0.0" "avr-libc" \" -*- nroff -*- .ad l .nh .SH NAME : Standard Integer Types \- .SS "Exact-width integer types" Integer types having exactly the specified width .in +1c .ti -1c .RI "typedef signed char \fBint8_t\fP" .br .ti -1c .RI "typedef unsigned char \fBuint8_t\fP" .br .ti -1c .RI "typedef signed int \fBint16_t\fP" .br .ti -1c .RI "typedef unsigned int \fBuint16_t\fP" .br .ti -1c .RI "typedef signed long int \fBint32_t\fP" .br .ti -1c .RI "typedef unsigned long int \fBuint32_t\fP" .br .ti -1c .RI "typedef signed long long int \fBint64_t\fP" .br .ti -1c .RI "typedef unsigned long long int \fBuint64_t\fP" .br .in -1c .SS "Integer types capable of holding object pointers" These allow you to declare variables of the same size as a pointer. .in +1c .ti -1c .RI "typedef \fBint16_t\fP \fBintptr_t\fP" .br .ti -1c .RI "typedef \fBuint16_t\fP \fBuintptr_t\fP" .br .in -1c .SS "Minimum-width integer types" Integer types having at least the specified width .in +1c .ti -1c .RI "typedef \fBint8_t\fP \fBint_least8_t\fP" .br .ti -1c .RI "typedef \fBuint8_t\fP \fBuint_least8_t\fP" .br .ti -1c .RI "typedef \fBint16_t\fP \fBint_least16_t\fP" .br .ti -1c .RI "typedef \fBuint16_t\fP \fBuint_least16_t\fP" .br .ti -1c .RI "typedef \fBint32_t\fP \fBint_least32_t\fP" .br .ti -1c .RI "typedef \fBuint32_t\fP \fBuint_least32_t\fP" .br .ti -1c .RI "typedef \fBint64_t\fP \fBint_least64_t\fP" .br .ti -1c .RI "typedef \fBuint64_t\fP \fBuint_least64_t\fP" .br .in -1c .SS "Fastest minimum-width integer types" Integer types being usually fastest having at least the specified width .in +1c .ti -1c .RI "typedef \fBint8_t\fP \fBint_fast8_t\fP" .br .ti -1c .RI "typedef \fBuint8_t\fP \fBuint_fast8_t\fP" .br .ti -1c .RI "typedef \fBint16_t\fP \fBint_fast16_t\fP" .br .ti -1c .RI "typedef \fBuint16_t\fP \fBuint_fast16_t\fP" .br .ti -1c .RI "typedef \fBint32_t\fP \fBint_fast32_t\fP" .br .ti -1c .RI "typedef \fBuint32_t\fP \fBuint_fast32_t\fP" .br .ti -1c .RI "typedef \fBint64_t\fP \fBint_fast64_t\fP" .br .ti -1c .RI "typedef \fBuint64_t\fP \fBuint_fast64_t\fP" .br .in -1c .SS "Greatest-width integer types" Types designating integer data capable of representing any value of any integer type in the corresponding signed or unsigned category .in +1c .ti -1c .RI "typedef \fBint64_t\fP \fBintmax_t\fP" .br .ti -1c .RI "typedef \fBuint64_t\fP \fBuintmax_t\fP" .br .in -1c .SS "Limits of specified-width integer types" C++ implementations should define these macros only when __STDC_LIMIT_MACROS is defined before <\fBstdint.h\fP> is included .in +1c .ti -1c .RI "#define \fBINT8_MAX\fP 0x7f" .br .ti -1c .RI "#define \fBINT8_MIN\fP (-INT8_MAX - 1)" .br .ti -1c .RI "#define \fBUINT8_MAX\fP (INT8_MAX * 2 + 1)" .br .ti -1c .RI "#define \fBINT16_MAX\fP 0x7fff" .br .ti -1c .RI "#define \fBINT16_MIN\fP (-INT16_MAX - 1)" .br .ti -1c .RI "#define \fBUINT16_MAX\fP (__CONCAT(INT16_MAX, U) * 2U + 1U)" .br .ti -1c .RI "#define \fBINT32_MAX\fP 0x7fffffffL" .br .ti -1c .RI "#define \fBINT32_MIN\fP (-INT32_MAX - 1L)" .br .ti -1c .RI "#define \fBUINT32_MAX\fP (__CONCAT(INT32_MAX, U) * 2UL + 1UL)" .br .ti -1c .RI "#define \fBINT64_MAX\fP 0x7fffffffffffffffLL" .br .ti -1c .RI "#define \fBINT64_MIN\fP (-INT64_MAX - 1LL)" .br .ti -1c .RI "#define \fBUINT64_MAX\fP (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL)" .br .in -1c .SS "Limits of minimum-width integer types" .in +1c .ti -1c .RI "#define \fBINT_LEAST8_MAX\fP INT8_MAX" .br .ti -1c .RI "#define \fBINT_LEAST8_MIN\fP INT8_MIN" .br .ti -1c .RI "#define \fBUINT_LEAST8_MAX\fP UINT8_MAX" .br .ti -1c .RI "#define \fBINT_LEAST16_MAX\fP INT16_MAX" .br .ti -1c .RI "#define \fBINT_LEAST16_MIN\fP INT16_MIN" .br .ti -1c .RI "#define \fBUINT_LEAST16_MAX\fP UINT16_MAX" .br .ti -1c .RI "#define \fBINT_LEAST32_MAX\fP INT32_MAX" .br .ti -1c .RI "#define \fBINT_LEAST32_MIN\fP INT32_MIN" .br .ti -1c .RI "#define \fBUINT_LEAST32_MAX\fP UINT32_MAX" .br .ti -1c .RI "#define \fBINT_LEAST64_MAX\fP INT64_MAX" .br .ti -1c .RI "#define \fBINT_LEAST64_MIN\fP INT64_MIN" .br .ti -1c .RI "#define \fBUINT_LEAST64_MAX\fP UINT64_MAX" .br .in -1c .SS "Limits of fastest minimum-width integer types" .in +1c .ti -1c .RI "#define \fBINT_FAST8_MAX\fP INT8_MAX" .br .ti -1c .RI "#define \fBINT_FAST8_MIN\fP INT8_MIN" .br .ti -1c .RI "#define \fBUINT_FAST8_MAX\fP UINT8_MAX" .br .ti -1c .RI "#define \fBINT_FAST16_MAX\fP INT16_MAX" .br .ti -1c .RI "#define \fBINT_FAST16_MIN\fP INT16_MIN" .br .ti -1c .RI "#define \fBUINT_FAST16_MAX\fP UINT16_MAX" .br .ti -1c .RI "#define \fBINT_FAST32_MAX\fP INT32_MAX" .br .ti -1c .RI "#define \fBINT_FAST32_MIN\fP INT32_MIN" .br .ti -1c .RI "#define \fBUINT_FAST32_MAX\fP UINT32_MAX" .br .ti -1c .RI "#define \fBINT_FAST64_MAX\fP INT64_MAX" .br .ti -1c .RI "#define \fBINT_FAST64_MIN\fP INT64_MIN" .br .ti -1c .RI "#define \fBUINT_FAST64_MAX\fP UINT64_MAX" .br .in -1c .SS "Limits of integer types capable of holding object pointers" .in +1c .ti -1c .RI "#define \fBINTPTR_MAX\fP INT16_MAX" .br .ti -1c .RI "#define \fBINTPTR_MIN\fP INT16_MIN" .br .ti -1c .RI "#define \fBUINTPTR_MAX\fP UINT16_MAX" .br .in -1c .SS "Limits of greatest-width integer types" .in +1c .ti -1c .RI "#define \fBINTMAX_MAX\fP INT64_MAX" .br .ti -1c .RI "#define \fBINTMAX_MIN\fP INT64_MIN" .br .ti -1c .RI "#define \fBUINTMAX_MAX\fP UINT64_MAX" .br .in -1c .SS "Limits of other integer types" C++ implementations should define these macros only when __STDC_LIMIT_MACROS is defined before <\fBstdint.h\fP> is included .in +1c .ti -1c .RI "#define \fBPTRDIFF_MAX\fP INT16_MAX" .br .ti -1c .RI "#define \fBPTRDIFF_MIN\fP INT16_MIN" .br .ti -1c .RI "#define \fBSIG_ATOMIC_MAX\fP INT8_MAX" .br .ti -1c .RI "#define \fBSIG_ATOMIC_MIN\fP INT8_MIN" .br .ti -1c .RI "#define \fBSIZE_MAX\fP UINT16_MAX" .br .ti -1c .RI "#define \fBWCHAR_MAX\fP __WCHAR_MAX__" .br .ti -1c .RI "#define \fBWCHAR_MIN\fP __WCHAR_MIN__" .br .ti -1c .RI "#define \fBWINT_MAX\fP __WINT_MAX__" .br .ti -1c .RI "#define \fBWINT_MIN\fP __WINT_MIN__" .br .in -1c .SS "Macros for integer constants" C++ implementations should define these macros only when __STDC_CONSTANT_MACROS is defined before <\fBstdint.h\fP> is included. .PP These definitions are valid for integer constants without suffix and for macros defined as integer constant without suffix .in +1c .ti -1c .RI "#define \fBINT8_C\fP(value) ((\fBint8_t\fP) value)" .br .ti -1c .RI "#define \fBUINT8_C\fP(value) ((\fBuint8_t\fP) __CONCAT(value, U))" .br .ti -1c .RI "#define \fBINT16_C\fP(value) value" .br .ti -1c .RI "#define \fBUINT16_C\fP(value) __CONCAT(value, U)" .br .ti -1c .RI "#define \fBINT32_C\fP(value) __CONCAT(value, L)" .br .ti -1c .RI "#define \fBUINT32_C\fP(value) __CONCAT(value, UL)" .br .ti -1c .RI "#define \fBINT64_C\fP(value) __CONCAT(value, LL)" .br .ti -1c .RI "#define \fBUINT64_C\fP(value) __CONCAT(value, ULL)" .br .ti -1c .RI "#define \fBINTMAX_C\fP(value) __CONCAT(value, LL)" .br .ti -1c .RI "#define \fBUINTMAX_C\fP(value) __CONCAT(value, ULL)" .br .in -1c .SH "Detailed Description" .PP .PP .nf #include .fi .PP .PP Use [u]intN_t if you need exactly N bits. .PP Since these typedefs are mandated by the C99 standard, they are preferred over rolling your own typedefs. .SH "Define Documentation" .PP .SS "#define INT16_C(value) value"define a constant of type int16_t .SS "#define INT16_MAX 0x7fff"largest positive value an int16_t can hold. .SS "#define INT16_MIN (-INT16_MAX - 1)"smallest negative value an int16_t can hold. .SS "#define INT32_C(value) __CONCAT(value, L)"define a constant of type int32_t .SS "#define INT32_MAX 0x7fffffffL"largest positive value an int32_t can hold. .SS "#define INT32_MIN (-INT32_MAX - 1L)"smallest negative value an int32_t can hold. .SS "#define INT64_C(value) __CONCAT(value, LL)"define a constant of type int64_t .SS "#define INT64_MAX 0x7fffffffffffffffLL"largest positive value an int64_t can hold. .SS "#define INT64_MIN (-INT64_MAX - 1LL)"smallest negative value an int64_t can hold. .SS "#define INT8_C(value) ((\fBint8_t\fP) value)"define a constant of type int8_t .SS "#define INT8_MAX 0x7f"largest positive value an int8_t can hold. .SS "#define INT8_MIN (-INT8_MAX - 1)"smallest negative value an int8_t can hold. .SS "#define INT_FAST16_MAX INT16_MAX"largest positive value an int_fast16_t can hold. .SS "#define INT_FAST16_MIN INT16_MIN"smallest negative value an int_fast16_t can hold. .SS "#define INT_FAST32_MAX INT32_MAX"largest positive value an int_fast32_t can hold. .SS "#define INT_FAST32_MIN INT32_MIN"smallest negative value an int_fast32_t can hold. .SS "#define INT_FAST64_MAX INT64_MAX"largest positive value an int_fast64_t can hold. .SS "#define INT_FAST64_MIN INT64_MIN"smallest negative value an int_fast64_t can hold. .SS "#define INT_FAST8_MAX INT8_MAX"largest positive value an int_fast8_t can hold. .SS "#define INT_FAST8_MIN INT8_MIN"smallest negative value an int_fast8_t can hold. .SS "#define INT_LEAST16_MAX INT16_MAX"largest positive value an int_least16_t can hold. .SS "#define INT_LEAST16_MIN INT16_MIN"smallest negative value an int_least16_t can hold. .SS "#define INT_LEAST32_MAX INT32_MAX"largest positive value an int_least32_t can hold. .SS "#define INT_LEAST32_MIN INT32_MIN"smallest negative value an int_least32_t can hold. .SS "#define INT_LEAST64_MAX INT64_MAX"largest positive value an int_least64_t can hold. .SS "#define INT_LEAST64_MIN INT64_MIN"smallest negative value an int_least64_t can hold. .SS "#define INT_LEAST8_MAX INT8_MAX"largest positive value an int_least8_t can hold. .SS "#define INT_LEAST8_MIN INT8_MIN"smallest negative value an int_least8_t can hold. .SS "#define INTMAX_C(value) __CONCAT(value, LL)"define a constant of type intmax_t .SS "#define INTMAX_MAX INT64_MAX"largest positive value an intmax_t can hold. .SS "#define INTMAX_MIN INT64_MIN"smallest negative value an intmax_t can hold. .SS "#define INTPTR_MAX INT16_MAX"largest positive value an intptr_t can hold. .SS "#define INTPTR_MIN INT16_MIN"smallest negative value an intptr_t can hold. .SS "#define PTRDIFF_MAX INT16_MAX"largest positive value a ptrdiff_t can hold. .SS "#define PTRDIFF_MIN INT16_MIN"smallest negative value a ptrdiff_t can hold. .SS "#define SIG_ATOMIC_MAX INT8_MAX"largest positive value a sig_atomic_t can hold. .SS "#define SIG_ATOMIC_MIN INT8_MIN"smallest negative value a sig_atomic_t can hold. .SS "#define SIZE_MAX UINT16_MAX"largest value a size_t can hold. .SS "#define UINT16_C(value) __CONCAT(value, U)"define a constant of type uint16_t .SS "#define UINT16_MAX (__CONCAT(INT16_MAX, U) * 2U + 1U)"largest value an uint16_t can hold. .SS "#define UINT32_C(value) __CONCAT(value, UL)"define a constant of type uint32_t .SS "#define UINT32_MAX (__CONCAT(INT32_MAX, U) * 2UL + 1UL)"largest value an uint32_t can hold. .SS "#define UINT64_C(value) __CONCAT(value, ULL)"define a constant of type uint64_t .SS "#define UINT64_MAX (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL)"largest value an uint64_t can hold. .SS "#define UINT8_C(value) ((\fBuint8_t\fP) __CONCAT(value, U))"define a constant of type uint8_t .SS "#define UINT8_MAX (INT8_MAX * 2 + 1)"largest value an uint8_t can hold. .SS "#define UINT_FAST16_MAX UINT16_MAX"largest value an uint_fast16_t can hold. .SS "#define UINT_FAST32_MAX UINT32_MAX"largest value an uint_fast32_t can hold. .SS "#define UINT_FAST64_MAX UINT64_MAX"largest value an uint_fast64_t can hold. .SS "#define UINT_FAST8_MAX UINT8_MAX"largest value an uint_fast8_t can hold. .SS "#define UINT_LEAST16_MAX UINT16_MAX"largest value an uint_least16_t can hold. .SS "#define UINT_LEAST32_MAX UINT32_MAX"largest value an uint_least32_t can hold. .SS "#define UINT_LEAST64_MAX UINT64_MAX"largest value an uint_least64_t can hold. .SS "#define UINT_LEAST8_MAX UINT8_MAX"largest value an uint_least8_t can hold. .SS "#define UINTMAX_C(value) __CONCAT(value, ULL)"define a constant of type uintmax_t .SS "#define UINTMAX_MAX UINT64_MAX"largest value an uintmax_t can hold. .SS "#define UINTPTR_MAX UINT16_MAX"largest value an uintptr_t can hold. .SH "Typedef Documentation" .PP .SS "typedef signed int \fBint16_t\fP"16-bit signed type. .SS "typedef signed long int \fBint32_t\fP"32-bit signed type. .SS "typedef signed long long int \fBint64_t\fP"64-bit signed type. .PP \fBNote:\fP .RS 4 This type is not available when the compiler option -mint8 is in effect. .RE .PP .SS "typedef signed char \fBint8_t\fP"8-bit signed type. .SS "typedef \fBint16_t\fP \fBint_fast16_t\fP"fastest signed int with at least 16 bits. .SS "typedef \fBint32_t\fP \fBint_fast32_t\fP"fastest signed int with at least 32 bits. .SS "typedef \fBint64_t\fP \fBint_fast64_t\fP"fastest signed int with at least 64 bits. .PP \fBNote:\fP .RS 4 This type is not available when the compiler option -mint8 is in effect. .RE .PP .SS "typedef \fBint8_t\fP \fBint_fast8_t\fP"fastest signed int with at least 8 bits. .SS "typedef \fBint16_t\fP \fBint_least16_t\fP"signed int with at least 16 bits. .SS "typedef \fBint32_t\fP \fBint_least32_t\fP"signed int with at least 32 bits. .SS "typedef \fBint64_t\fP \fBint_least64_t\fP"signed int with at least 64 bits. .PP \fBNote:\fP .RS 4 This type is not available when the compiler option -mint8 is in effect. .RE .PP .SS "typedef \fBint8_t\fP \fBint_least8_t\fP"signed int with at least 8 bits. .SS "typedef \fBint64_t\fP \fBintmax_t\fP"largest signed int available. .SS "typedef \fBint16_t\fP \fBintptr_t\fP"Signed pointer compatible type. .SS "typedef unsigned int \fBuint16_t\fP"16-bit unsigned type. .SS "typedef unsigned long int \fBuint32_t\fP"32-bit unsigned type. .SS "typedef unsigned long long int \fBuint64_t\fP"64-bit unsigned type. .PP \fBNote:\fP .RS 4 This type is not available when the compiler option -mint8 is in effect. .RE .PP .SS "typedef unsigned char \fBuint8_t\fP"8-bit unsigned type. .SS "typedef \fBuint16_t\fP \fBuint_fast16_t\fP"fastest unsigned int with at least 16 bits. .SS "typedef \fBuint32_t\fP \fBuint_fast32_t\fP"fastest unsigned int with at least 32 bits. .SS "typedef \fBuint64_t\fP \fBuint_fast64_t\fP"fastest unsigned int with at least 64 bits. .PP \fBNote:\fP .RS 4 This type is not available when the compiler option -mint8 is in effect. .RE .PP .SS "typedef \fBuint8_t\fP \fBuint_fast8_t\fP"fastest unsigned int with at least 8 bits. .SS "typedef \fBuint16_t\fP \fBuint_least16_t\fP"unsigned int with at least 16 bits. .SS "typedef \fBuint32_t\fP \fBuint_least32_t\fP"unsigned int with at least 32 bits. .SS "typedef \fBuint64_t\fP \fBuint_least64_t\fP"unsigned int with at least 64 bits. .PP \fBNote:\fP .RS 4 This type is not available when the compiler option -mint8 is in effect. .RE .PP .SS "typedef \fBuint8_t\fP \fBuint_least8_t\fP"unsigned int with at least 8 bits. .SS "typedef \fBuint64_t\fP \fBuintmax_t\fP"largest unsigned int available. .SS "typedef \fBuint16_t\fP \fBuintptr_t\fP"Unsigned pointer compatible type. .SH "Author" .PP Generated automatically by Doxygen for avr-libc from the source code.