Document number: P4378R0
Audience: SG22, LEWG, LWG


Murat Can Çağrı
2026-09-15

Align exact-width integer types with C23

Abstract

C23 requires the exact-width typedef names for every width for which an implementation provides a standard or extended integer type with no padding bits. C++ retains this requirement only for widths 8, 16, 32, and 64. This paper aligns C++ with C23.

Discussion

C23 removed the intmax_t/uintmax_t ABI obstacle to wider extended integer types through N2888. C++ adopted the corresponding relaxation for C++23 in LWG 3828. These greatest-width types are no longer required to cover extended integer types wider than long long and unsigned long long, respectively.

Wording

Modify [cstdint.syn]/3 with the following changes:

All types that use the placeholder N are optional when N is not 8, 16, 32, or 64. The exact-width types intN_t and uintN_t for N = 8, 16, 32, and 64 are also optional; however, if If an implementation defines integer types with the corresponding provides standard or extended integer types with a particular width N and no padding bits, it declares the corresponding typedef-names. Each of the macros listed in this subclause is defined if and only if the implementation declares the corresponding typedef-name. [Note 1: The macros INTN_C and UINTN_C correspond to the typedef-names int_leastN_t and uint_leastN_t, respectively. — end note]

All wording is relative to N5054.

References

[N5054] Working Draft, Programming Languages — C++, 2026-07-16.

[ISO/IEC 9899:2024] Programming Languages — C, 7.22.1.1 paragraph 3 (N3220, page 317).

[N2888] Jens Gustedt, Require exact-width integer type interfaces, adopted change in 7.20.1.1 paragraph 3, 2021-12-01.