---
name: "intptr_t"
section: "3avr"
platform: "linux"
package: "avr-libc"
version: "1:2.2.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/avr_stdint"
---

# intptr\_t(3avr)

\<stdint.h\>: Standard Integer Types

Part of [avr\_stdint(3avr)](/avr_stdint/3avr.md).

## NAME

avr\_stdint - \<stdint.h\>: Standard Integer Types

## SYNOPSIS

### Exact-width integer types

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**\

### Integer types capable of holding object pointers

These allow you to declare variables of the same size as a pointer.  typedef **int16\_t** **intptr\_t**\
 typedef **uint16\_t** **uintptr\_t**\

### Minimum-width integer types

Integer types having at least the specified width  typedef **int8\_t** **int\_least8\_t**\
 typedef **uint8\_t** **uint\_least8\_t**\
 typedef **int16\_t** **int\_least16\_t**\
 typedef **uint16\_t** **uint\_least16\_t**\
 typedef **int32\_t** **int\_least32\_t**\
 typedef **uint32\_t** **uint\_least32\_t**\
 typedef **int64\_t** **int\_least64\_t**\
 typedef **uint64\_t** **uint\_least64\_t**\

### Fastest minimum-width integer types

Integer types being usually fastest having at least the specified width  typedef **int8\_t** **int\_fast8\_t**\
 typedef **uint8\_t** **uint\_fast8\_t**\
 typedef **int16\_t** **int\_fast16\_t**\
 typedef **uint16\_t** **uint\_fast16\_t**\
 typedef **int32\_t** **int\_fast32\_t**\
 typedef **uint32\_t** **uint\_fast32\_t**\
 typedef **int64\_t** **int\_fast64\_t**\
 typedef **uint64\_t** **uint\_fast64\_t**\

### Greatest-width integer types

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**\

### Limits of specified-width integer types

C++ implementations should define these macros only when \_\_STDC\_LIMIT\_MACROS is defined before \<**stdint.h**\> is included  #define **INT8\_MAX**   0x7f\
 \#define **INT8\_MIN**   (-**INT8\_MAX** - 1)\
 \#define **UINT8\_MAX**   (**INT8\_MAX** \* 2 + 1)\
 \#define **INT16\_MAX**   0x7fff\
 \#define **INT16\_MIN**   (-**INT16\_MAX** - 1)\
 \#define **UINT16\_MAX**   (\_\_CONCAT(**INT16\_MAX**, U) \* 2U + 1U)\
 \#define **INT32\_MAX**   0x7fffffffL\
 \#define **INT32\_MIN**   (-**INT32\_MAX** - 1L)\
 \#define **UINT32\_MAX**   (\_\_CONCAT(**INT32\_MAX**, U) \* 2UL + 1UL)\
 \#define **INT64\_MAX**   0x7fffffffffffffffLL\
 \#define **INT64\_MIN**   (-**INT64\_MAX** - 1LL)\
 \#define **UINT64\_MAX**   (\_\_CONCAT(**INT64\_MAX**, U) \* 2ULL + 1ULL)\

### Limits of minimum-width integer types

\#define **INT\_LEAST8\_MAX**   **INT8\_MAX**\
 \#define **INT\_LEAST8\_MIN**   **INT8\_MIN**\
 \#define **UINT\_LEAST8\_MAX**   **UINT8\_MAX**\
 \#define **INT\_LEAST16\_MAX**   **INT16\_MAX**\
 \#define **INT\_LEAST16\_MIN**   **INT16\_MIN**\
 \#define **UINT\_LEAST16\_MAX**   **UINT16\_MAX**\
 \#define **INT\_LEAST32\_MAX**   **INT32\_MAX**\
 \#define **INT\_LEAST32\_MIN**   **INT32\_MIN**\
 \#define **UINT\_LEAST32\_MAX**   **UINT32\_MAX**\
 \#define **INT\_LEAST64\_MAX**   **INT64\_MAX**\
 \#define **INT\_LEAST64\_MIN**   **INT64\_MIN**\
 \#define **UINT\_LEAST64\_MAX**   **UINT64\_MAX**\

### Limits of fastest minimum-width integer types

\#define **INT\_FAST8\_MAX**   **INT8\_MAX**\
 \#define **INT\_FAST8\_MIN**   **INT8\_MIN**\
 \#define **UINT\_FAST8\_MAX**   **UINT8\_MAX**\
 \#define **INT\_FAST16\_MAX**   **INT16\_MAX**\
 \#define **INT\_FAST16\_MIN**   **INT16\_MIN**\
 \#define **UINT\_FAST16\_MAX**   **UINT16\_MAX**\
 \#define **INT\_FAST32\_MAX**   **INT32\_MAX**\
 \#define **INT\_FAST32\_MIN**   **INT32\_MIN**\
 \#define **UINT\_FAST32\_MAX**   **UINT32\_MAX**\
 \#define **INT\_FAST64\_MAX**   **INT64\_MAX**\
 \#define **INT\_FAST64\_MIN**   **INT64\_MIN**\
 \#define **UINT\_FAST64\_MAX**   **UINT64\_MAX**\

### Limits of integer types capable of holding object pointers

\#define **INTPTR\_MAX**   **INT16\_MAX**\
 \#define **INTPTR\_MIN**   **INT16\_MIN**\
 \#define **UINTPTR\_MAX**   **UINT16\_MAX**\

### Limits of greatest-width integer types

\#define **INTMAX\_MAX**   **INT64\_MAX**\
 \#define **INTMAX\_MIN**   **INT64\_MIN**\
 \#define **UINTMAX\_MAX**   **UINT64\_MAX**\

### Limits of other integer types

C++ implementations should define these macros only when \_\_STDC\_LIMIT\_MACROS is defined before \<**stdint.h**\> is included  #define **PTRDIFF\_MAX**   **INT16\_MAX**\
 \#define **PTRDIFF\_MIN**   **INT16\_MIN**\
 \#define **SIG\_ATOMIC\_MAX**   **INT8\_MAX**\
 \#define **SIG\_ATOMIC\_MIN**   **INT8\_MIN**\
 \#define **SIZE\_MAX**   **UINT16\_MAX**\
 \#define **WCHAR\_MAX**   \_\_WCHAR\_MAX\_\_\
 \#define **WCHAR\_MIN**   \_\_WCHAR\_MIN\_\_\
 \#define **WINT\_MAX**   \_\_WINT\_MAX\_\_\
 \#define **WINT\_MIN**   \_\_WINT\_MIN\_\_\

### Macros for integer constants

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)\

## Detailed Description

```
#include <stdint.h>
```

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.

## Macro Definition Documentation

### #define INT16\_C(value) value

define a constant of type int16\_t

### #define INT16\_MAX 0x7fff

largest positive value an int16\_t can hold.

### #define INT16\_MIN (-INT16\_MAX - 1)

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.

### #define INT32\_MIN (-INT32\_MAX - 1L)

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.

### #define INT64\_MIN (-INT64\_MAX - 1LL)

smallest negative value an int64\_t can hold.

### #define INT8\_C(value) ((int8\_t) value)

define a constant of type int8\_t

### #define INT8\_MAX 0x7f

largest positive value an int8\_t can hold.

### #define INT8\_MIN (-INT8\_MAX - 1)

smallest negative value an int8\_t can hold.

### #define INT\_FAST16\_MAX INT16\_MAX

largest positive value an int\_fast16\_t can hold.

### #define INT\_FAST16\_MIN INT16\_MIN

smallest negative value an int\_fast16\_t can hold.

### #define INT\_FAST32\_MAX INT32\_MAX

largest positive value an int\_fast32\_t can hold.

### #define INT\_FAST32\_MIN INT32\_MIN

smallest negative value an int\_fast32\_t can hold.

### #define INT\_FAST64\_MAX INT64\_MAX

largest positive value an int\_fast64\_t can hold.

### #define INT\_FAST64\_MIN INT64\_MIN

smallest negative value an int\_fast64\_t can hold.

### #define INT\_FAST8\_MAX INT8\_MAX

largest positive value an int\_fast8\_t can hold.

### #define INT\_FAST8\_MIN INT8\_MIN

smallest negative value an int\_fast8\_t can hold.

### #define INT\_LEAST16\_MAX INT16\_MAX

largest positive value an int\_least16\_t can hold.

### #define INT\_LEAST16\_MIN INT16\_MIN

smallest negative value an int\_least16\_t can hold.

### #define INT\_LEAST32\_MAX INT32\_MAX

largest positive value an int\_least32\_t can hold.

### #define INT\_LEAST32\_MIN INT32\_MIN

smallest negative value an int\_least32\_t can hold.

### #define INT\_LEAST64\_MAX INT64\_MAX

largest positive value an int\_least64\_t can hold.

### #define INT\_LEAST64\_MIN INT64\_MIN

smallest negative value an int\_least64\_t can hold.

### #define INT\_LEAST8\_MAX INT8\_MAX

largest positive value an int\_least8\_t can hold.

### #define INT\_LEAST8\_MIN INT8\_MIN

smallest negative value an int\_least8\_t can hold.

### #define INTMAX\_C(value) \_\_CONCAT(value, LL)

define a constant of type intmax\_t

### #define INTMAX\_MAX INT64\_MAX

largest positive value an intmax\_t can hold.

### #define INTMAX\_MIN INT64\_MIN

smallest negative value an intmax\_t can hold.

### #define INTPTR\_MAX INT16\_MAX

largest positive value an intptr\_t can hold.

### #define INTPTR\_MIN INT16\_MIN

smallest negative value an intptr\_t can hold.

### #define PTRDIFF\_MAX INT16\_MAX

largest positive value a ptrdiff\_t can hold.

### #define PTRDIFF\_MIN INT16\_MIN

smallest negative value a ptrdiff\_t can hold.

### #define SIG\_ATOMIC\_MAX INT8\_MAX

largest positive value a sig\_atomic\_t can hold.

### #define SIG\_ATOMIC\_MIN INT8\_MIN

smallest negative value a sig\_atomic\_t can hold.

### #define SIZE\_MAX UINT16\_MAX

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 (INT8\_MAX \* 2 + 1)

largest value an uint8\_t can hold.

### #define UINT\_FAST16\_MAX UINT16\_MAX

largest value an uint\_fast16\_t can hold.

### #define UINT\_FAST32\_MAX UINT32\_MAX

largest value an uint\_fast32\_t can hold.

### #define UINT\_FAST64\_MAX UINT64\_MAX

largest value an uint\_fast64\_t can hold.

### #define UINT\_FAST8\_MAX UINT8\_MAX

largest value an uint\_fast8\_t can hold.

### #define UINT\_LEAST16\_MAX UINT16\_MAX

largest value an uint\_least16\_t can hold.

### #define UINT\_LEAST32\_MAX UINT32\_MAX

largest value an uint\_least32\_t can hold.

### #define UINT\_LEAST64\_MAX UINT64\_MAX

largest value an uint\_least64\_t can hold.

### #define UINT\_LEAST8\_MAX UINT8\_MAX

largest value an uint\_least8\_t can hold.

### #define UINTMAX\_C(value) \_\_CONCAT(value, ULL)

define a constant of type uintmax\_t

### #define UINTMAX\_MAX UINT64\_MAX

largest value an uintmax\_t can hold.

### #define UINTPTR\_MAX UINT16\_MAX

largest value an uintptr\_t can hold.

## Typedef Documentation

### typedef signed int int16\_t

16-bit signed type.

### typedef signed long int int32\_t

32-bit signed type.

### 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.

### typedef signed char int8\_t

8-bit signed type.

### typedef int16\_t int\_fast16\_t

fastest signed int with at least 16 bits.

### typedef int32\_t int\_fast32\_t

fastest signed int with at least 32 bits.

### typedef int64\_t int\_fast64\_t

fastest signed int with at least 64 bits.

**Note**

This type is not available when the compiler option -mint8 is in effect.

### typedef int8\_t int\_fast8\_t

fastest signed int with at least 8 bits.

### typedef int16\_t int\_least16\_t

signed int with at least 16 bits.

### typedef int32\_t int\_least32\_t

signed int with at least 32 bits.

### typedef int64\_t int\_least64\_t

signed int with at least 64 bits.

**Note**

This type is not available when the compiler option -mint8 is in effect.

### typedef int8\_t int\_least8\_t

signed int with at least 8 bits.

### typedef int64\_t intmax\_t

largest signed int available.

### typedef int16\_t intptr\_t

Signed pointer compatible type.

### typedef unsigned int uint16\_t

16-bit unsigned type.

### typedef unsigned long int uint32\_t

32-bit unsigned type.

### typedef unsigned long long int uint64\_t

64-bit unsigned type.

**Note**

This type is not available when the compiler option -mint8 is in effect.

### typedef unsigned char uint8\_t

8-bit unsigned type.

### typedef uint16\_t uint\_fast16\_t

fastest unsigned int with at least 16 bits.

### typedef uint32\_t uint\_fast32\_t

fastest unsigned int with at least 32 bits.

### typedef uint64\_t uint\_fast64\_t

fastest unsigned int with at least 64 bits.

**Note**

This type is not available when the compiler option -mint8 is in effect.

### typedef uint8\_t uint\_fast8\_t

fastest unsigned int with at least 8 bits.

### typedef uint16\_t uint\_least16\_t

unsigned int with at least 16 bits.

### typedef uint32\_t uint\_least32\_t

unsigned int with at least 32 bits.

### typedef uint64\_t uint\_least64\_t

unsigned int with at least 64 bits.

**Note**

This type is not available when the compiler option -mint8 is in effect.

### typedef uint8\_t uint\_least8\_t

unsigned int with at least 8 bits.

### typedef uint64\_t uintmax\_t

largest unsigned int available.

### typedef uint16\_t uintptr\_t

Unsigned pointer compatible type.

## Author

Generated automatically by Doxygen for AVR-LibC from the source code.
