This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Dup status.
Section: 21.4.1 [cstdint.syn] Status: Dup Submitter: Thomas Koeppe Opened: 2016-08-10 Last modified: 2017-05-31
View all other issues in [cstdint.syn].
View all issues with Dup status.
Are the macros
INT[8, 16, 32, 64]_MAX etc. optional?
<cstddint>header is specified to have all types and macros "defined the same as in C". But C is also unclear about this: the fixed-width types like
int32_tare optional in C and in C++. The corresponding macro
INT32_MAXis defined in terms of an expression of the same type as the "corresponding type converted according to the integral promotions". But if the "corresponding type" does not exist, then surely the macro too cannot exist? It seems that the macros should also be optional. Suggested resolution: See e.g. here, or equivalent wording to the effect that the macros
INT*_MAXetc are defined if and only if the corresponding integer type is defined. (Note that the types
uintptr_tare also optional.)
[2016-08-11, Richard comments]
C allows other values for
N in addition to 8, 16, 32, 64, whereas it appears that C++ does not.
Is the difference intentional?
[2016-09-09 Issues Resolution Telecon]
We need to answer Richard's question before making this ready
Close as a duplicate of 2820 per Thomas' request.