Mercurial > ms-int-types
comparison stdint.h @ 17:5f2b8140b2cd
Explicitly cast to appropriate type INT8_MIN, INT16_MIN, INT32_MIN and INT64_MIN constants.
Due to their unusual definition in Visual Studio headers (-_Ix_MAX-1) they are propagated to int and thus do not have expected type, causing VS6 strict compiler to claim about type inconsistency.
| author | ipse.c99@d525d15b-5824-0410-80a3-6185d19c2cde |
|---|---|
| date | Tue, 03 Jul 2007 22:14:40 +0000 |
| parents | 5ce8bdb1369f |
| children | febb32e4ac04 |
comparison
equal
deleted
inserted
replaced
| 16:5ce8bdb1369f | 17:5f2b8140b2cd |
|---|---|
| 102 // 7.18.2 Limits of specified-width integer types | 102 // 7.18.2 Limits of specified-width integer types |
| 103 | 103 |
| 104 #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 | 104 #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 |
| 105 | 105 |
| 106 // 7.18.2.1 Limits of exact-width integer types | 106 // 7.18.2.1 Limits of exact-width integer types |
| 107 #define INT8_MIN _I8_MIN | 107 #define INT8_MIN ((int8_t)_I8_MIN) |
| 108 #define INT8_MAX _I8_MAX | 108 #define INT8_MAX _I8_MAX |
| 109 #define INT16_MIN _I16_MIN | 109 #define INT16_MIN ((int16_t)_I16_MIN) |
| 110 #define INT16_MAX _I16_MAX | 110 #define INT16_MAX _I16_MAX |
| 111 #define INT32_MIN _I32_MIN | 111 #define INT32_MIN ((int32_t)_I32_MIN) |
| 112 #define INT32_MAX _I32_MAX | 112 #define INT32_MAX _I32_MAX |
| 113 #define INT64_MIN _I64_MIN | 113 #define INT64_MIN ((int64_t)_I64_MIN) |
| 114 #define INT64_MAX _I64_MAX | 114 #define INT64_MAX _I64_MAX |
| 115 #define UINT8_MAX _UI8_MAX | 115 #define UINT8_MAX _UI8_MAX |
| 116 #define UINT16_MAX _UI16_MAX | 116 #define UINT16_MAX _UI16_MAX |
| 117 #define UINT32_MAX _UI32_MAX | 117 #define UINT32_MAX _UI32_MAX |
| 118 #define UINT64_MAX _UI64_MAX | 118 #define UINT64_MAX _UI64_MAX |
