Created on 2016-08-10.00:00:00 last changed 94 months ago
[ 2017-03-04, Kona ]
Close as a duplicate of 2820 per Thomas' request.
[ 2016-09-09 Issues Resolution Telecon ]
We need to answer Richard's question before making this ready
[ 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?
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_t
are optional in C and in C++.
The corresponding macro INT32_MAX
is 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*_MAX
etc are defined if and only if the corresponding integer type is
defined.
(Note that the types intptr_t
and uintptr_t
are also optional.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-03-14 03:14:09 | admin | set | messages: + msg9104 |
2017-03-14 03:14:09 | admin | set | status: new -> dup |
2016-09-12 04:36:33 | admin | set | messages: + msg8506 |
2016-08-11 18:42:24 | admin | set | messages: + msg8480 |
2016-08-10 00:00:00 | admin | create |