.\" Copyright 2020, Michael Kerrisk .\" Copyright, the authors of the Linux man-pages project .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .TH intptr_t 3type 2026-02-08 "Linux man-pages 6.17" .SH NAME intptr_t, uintptr_t \- integer types wide enough to hold pointers .SH LIBRARY Standard C library .RI ( libc ) .SH SYNOPSIS .nf .B #include .P .BR typedef " /* ... */ " intptr_t; .BR typedef " /* ... */ " uintptr_t; .P .BR "#define INTPTR_WIDTH" " /* ... */" .B #define UINTPTR_WIDTH INTPTR_WIDTH .P .BR "#define INTPTR_MAX" " /* 2**(INTPTR_WIDTH \- 1) \- 1 */" .BR "#define INTPTR_MIN" " /* \- 2**(INTPTR_WIDTH \- 1) */" .BR "#define UINTPTR_MAX" " /* 2**UINTPTR_WIDTH \- 1 */" .fi .SH DESCRIPTION .I intptr_t is a signed integer type such that any valid .RI ( "void *" ) value can be converted to this type and then converted back. It is capable of storing values in the range .RB [ INTPTR_MIN , .BR INTPTR_MAX ]. .P .I uintptr_t is an unsigned integer type such that any valid .RI ( "void *" ) value can be converted to this type and then converted back. It is capable of storing values in the range .RB [ 0 , .BR UINTPTR_MAX ]. .P The macros .RB [ U ] INTPTR_WIDTH expand to the width in bits of these types. .P The macros .RB [ U ] INTPTR_MAX expand to the maximum value that these types can hold. .P The macro .B INTPTR_MIN expands to the minimum value that .I intptr_t can hold. .P The length modifiers for the .RI [ u ] intptr_t types for the .BR printf (3) family of functions are expanded by the macros .BR PRIdPTR , .BR PRIiPTR , and .B PRIuPTR (defined in .IR ); resulting commonly in .B %"PRIdPTR" or .B %"PRIiPTR" for printing .I intptr_t values. The length modifiers for the .RI [ u ] intptr_t types for the .BR scanf (3) family of functions are expanded by the macros .BR SCNdPTR , .BR SCNiPTR , and .B SCNuPTR (defined in .IR ); resulting commonly in .B %"SCNuPTR" for scanning .I uintptr_t values. .SH STANDARDS .TP .RI [ u ] intptr_t .TQ .RB [ U ] INTPTR_MAX .TQ .B INTPTR_MIN C23, POSIX.1-2024. .TP .RB [ U ] INTPTR_WIDTH C23. .SH HISTORY .TP .RI [ u ] intptr_t SUSv2, C99, POSIX.1-2001 XSI. .TP .RB [ U ] INTPTR_MAX .TQ .B INTPTR_MIN C99, POSIX.1-2001 XSI. .TP .RB [ U ] INTPTR_WIDTH C23. .SH NOTES The following header also provides these types: .IR . .SH SEE ALSO .BR intmax_t (3type), .BR void (3)