diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-02-07 12:08:27 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-02-07 12:08:27 -0500 |
commit | a591e0383a0a31ac94541846796b93fedc63a0c4 (patch) | |
tree | 106471e3f4c6571b48c3924bf86c738df393df15 | |
parent | 36bf56940af90baa478dd1258884291d5d213d10 (diff) | |
download | musl-a591e0383a0a31ac94541846796b93fedc63a0c4.tar.gz musl-a591e0383a0a31ac94541846796b93fedc63a0c4.tar.xz musl-a591e0383a0a31ac94541846796b93fedc63a0c4.zip |
revert hacks for types of stdint.h integer constant macros
per 7.18.4: Each invocation of one of these macros shall expand to an integer constant expression suitable for use in #if preprocessing directives. The type of the expression shall have the same type as would an expression of the corresponding type converted according to the integer promotions. The value of the expression shall be that of the argument. the key phrase is "converted according to the integer promotions". thus there is no intent or allowance that the expression have smaller-than-int types.
-rw-r--r-- | include/stdint.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/stdint.h b/include/stdint.h index 634678a2..54006678 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -85,13 +85,13 @@ typedef unsigned long long uintmax_t; #if !defined __cplusplus || defined __STDC_CONSTANT_MACROS -#define INT8_C(c) ((int8_t) + (c)) -#define INT16_C(c) ((int16_t) + (c)) +#define INT8_C(c) c +#define INT16_C(c) c #define INT32_C(c) c #define INT64_C(c) c ## LL -#define UINT8_C(c) ((uint8_t) + (c)) -#define UINT16_C(c) ((uint16_t) + (c)) +#define UINT8_C(c) c ## U +#define UINT16_C(c) c ## U #define UINT32_C(c) c ## U #define UINT64_C(c) c ## ULL |