2025-02-16
integration into IS ISO/IEC 9899:202y
document number | date | comment |
---|---|---|
n3413 | 202412 | Original proposal |
n3496 | 202502 | Only claim existance of the macros for some types, not all |
CC BY, see https://creativecommons.org/licenses/by/4.0
The current wording in 5.3.5.3.2 has lead to misunderstandings, in
particular it had not been clear to implementations that the provided
values are further constrained later by specific properties of certain
integer types, in particular for bool
. We propose to
clarify this by making it explicit how the properties (width) and the
macros (_WIDTH
) relate.
New text is underlined green, removed text is
stroke-out red.
5.3.5.3.2 Characteristics of integer types
<limits.h>
and<stdint.h>
1 Many integer types that are defined in this document have a corresponding width macro with a name ending in
_WIDTH
.FTN) The values of these macros provide the number of bits in the value representation of the type (6.2.6.2). The values given subsequently shall be replaced by constant expressions suitable for use in conditional expression inclusion preprocessing directives.Their implementation-defined valuesThose of the values that are implementation-defined shall be equal or greater to those shown; otherwise the values shall be exact.
FTN) There are in particular macros for the standard integer types (6.2.5) and for
typedef
names as specified in the header<stdint.h>
(7.22).
Thanks to Aaron Ballman and Joseph Myers for discussion and feedback.