7.18 Integer types <stdint.h>

1

The header <stdint.h> declares sets of integer types having specified widths, and defines corresponding sets of macros.[1] It also defines macros that specify limits of integer types corresponding to types defined in other standard headers.

2

Types are defined in the following categories:

  • integer types having certain exact widths;

  • integer types having at least certain specified widths;

  • fastest integer types having at least certain specified widths;

  • integer types wide enough to hold pointers to objects;

  • integer types having greatest width.

(Some of these types may denote the same type.)

3

Corresponding macros specify limits of the declared types and construct suitable constants.

4

For each type described herein that the implementation provides,[2] <stdint.h> shall declare that typedef name and define the associated macros. Conversely, for each type described herein that the implementation does not provide, <stdint.h> shall not declare that typedef name nor shall it define the associated macros. An implementation shall provide those types described as “required”, but need not provide any of the others (described as “optional”).

Footnotes