mirror of
https://github.com/TinyCC/tinycc.git
synced 2025-12-26 17:18:57 +00:00
Fix char limits
By the standard CHAR_MIN and CHAR_MAX should be 0 and UCHAR_MAX respectively when char implementation is unsigned ( -fno-signed-char)
This commit is contained in:
@@ -23,8 +23,13 @@
|
|||||||
#define SCHAR_MAX 127
|
#define SCHAR_MAX 127
|
||||||
#define UCHAR_MAX 0xff
|
#define UCHAR_MAX 0xff
|
||||||
|
|
||||||
|
#ifndef __CHAR_UNSIGNED__
|
||||||
#define CHAR_MIN SCHAR_MIN
|
#define CHAR_MIN SCHAR_MIN
|
||||||
#define CHAR_MAX SCHAR_MAX
|
#define CHAR_MAX SCHAR_MAX
|
||||||
|
#else
|
||||||
|
#define CHAR_MIN 0
|
||||||
|
#define CHAR_MAX UCHAR_MAX
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MB_LEN_MAX 5
|
#define MB_LEN_MAX 5
|
||||||
#define SHRT_MIN (-32768)
|
#define SHRT_MIN (-32768)
|
||||||
|
|||||||
Reference in New Issue
Block a user