intptr_t(3type)
π intptr_t β the manual page, but make it make sense π
okay so bestie, welcome to the <bold>intptr_t(3type)</bold> glow-up π
this is the man page for the pointer-sized integer types, and honestly? they're lowkey the moment. no cap.
β¨ NAME β¨
intptr_t, uintptr_t β integer types wide enough to hold pointers π«Ά
π LIBRARY π
Standard C library (libc) π
πΈ SYNOPSIS πΈ
#include <stdint.h>
typedef /* ... */ intptr_t;
typedef /* ... */ uintptr_t;
#define INTPTR_WIDTH /* ... */
#define UINTPTR_WIDTH INTPTR_WIDTH
#define INTPTR_MAX /* 2**(INTPTR_WIDTH - 1) - 1 */
#define INTPTR_MIN /* - 2**(INTPTR_WIDTH - 1) */
#define UINTPTR_MAX /* 2**UINTPTR_WIDTH - 1 */
π¦ DESCRIPTION π¦
intptr_t is a signed integer type with main character energy for one very specific job: any valid (void *) value can be converted to this type, and then converted back again. it's capable of storing values in the range [INTPTR_MIN, INTPTR_MAX] β¨
uintptr_t is the unsigned sibling doing the exact same trick β any valid (void *) value converts into it and back again, no cap. it can store values in the range [0, UINTPTR_MAX] π
the macros [U]INTPTR_WIDTH expand to the width in bits of these types π
the macros [U]INTPTR_MAX expand to the maximum value these types can hold π₯
the macro INTPTR_MIN expands to the minimum value that intptr_t can hold πΈ
okay now the printf(3) family tea β the length modifiers for the [u]intptr_t types are expanded by the macros PRIdPTR, PRIiPTR, and PRIuPTR (defined in <inttypes.h>); resulting commonly in %"PRIdPTR" or %"PRIiPTR" for printing intptr_t values π
and for the scanf(3) family, the length modifiers for the [u]intptr_t types are expanded by the macros SCNdPTR, SCNiPTR, and SCNuPTR (defined in <inttypes.h>); resulting commonly in %"SCNuPTR" for scanning uintptr_t values π
π STANDARDS π
[u]intptr_t[U]INTPTR_MAXINTPTR_MIN
β C23, POSIX.1-2024 π
[U]INTPTR_WIDTH
β C23 β¨
π HISTORY π
[u]intptr_t
β SUSv2, C99, POSIX.1-2001 XSI π
[U]INTPTR_MAXINTPTR_MIN
β C99, POSIX.1-2001 XSI π
[U]INTPTR_WIDTH
β C23 π¦
π NOTES π
heads up bestie, this other header also provides these types: <inttypes.h> π
π SEE ALSO π
intmax_t(3type), void(3) β
and that's the whole vibe, bestie β this page was brought to you by the Linux man-pages 6.20, dated 2026-02-08, filed under intptr_t(3type). slay, stay pointer-safe, and hydrate π§π«Άπ
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 2020, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms