1intptr_t(3type)                                                intptr_t(3type)
2
3
4

NAME

6       intptr_t, uintptr_t - integer types wide enough to hold pointers
7

LIBRARY

9       Standard C library (libc)
10

SYNOPSIS

12       #include <stdint.h>
13
14       typedef /* ... */ intptr_t;
15       typedef /* ... */ uintptr_t;
16
17       #define INTPTR_WIDTH  /* ... */
18       #define UINTPTR_WIDTH INTPTR_WIDTH
19
20       #define INTPTR_MAX    /*  2**(INTPTR_WIDTH - 1) - 1  */
21       #define INTPTR_MIN    /*  - 2**(INTPTR_WIDTH - 1)    */
22       #define UINTPTR_MAX   /*  2**UINTPTR_WIDTH - 1       */
23

DESCRIPTION

25       intptr_t  is  a  signed integer type such that any valid (void *) value
26       can be converted to this type and then converted back.  It  is  capable
27       of storing values in the range [INTPTR_MIN, INTPTR_MAX].
28
29       uintptr_t  is  an  unsigned  integer  type such that any valid (void *)
30       value can be converted to this type and then converted back.  It is ca‐
31       pable of storing values in the range [0, INTPTR_MAX].
32
33       The macros [U]INTPTR_WIDTH expand to the width in bits of these types.
34
35       The  macros  [U]INTPTR_MAX expand to the maximum value that these types
36       can hold.
37
38       The macro INTPTR_MIN expands to the minimum  value  that  intptr_t  can
39       hold.
40
41       The length modifiers for the [u]intptr_t types for the printf(3) family
42       of functions are expanded by the macros PRIdPTR, PRIiPTR,  and  PRIuPTR
43       (defined  in  <inttypes.h>); resulting commonly in %"PRIdPTR" or %"PRI‐
44       iPTR" for printing intptr_t  values.   The  length  modifiers  for  the
45       [u]intptr_t  types for the scanf(3) family of functions are expanded by
46       the macros SCNdPTR, SCNiPTR, and SCNuPTR (defined in <inttypes.h>); re‐
47       sulting commonly in %"SCNuPTR" for scanning uintptr_t values.
48

STANDARDS

50       C11, POSIX.1-2008.
51

HISTORY

53       C99, POSIX.1-2001.
54

NOTES

56       The following header also provides these types: <inttypes.h>.
57

SEE ALSO

59       intmax_t(3type), void(3)
60
61
62
63Linux man-pages 6.05              2023-03-30                   intptr_t(3type)
Impressum