mirror of
https://github.com/TinyCC/tinycc.git
synced 2025-11-16 04:24:45 +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 UCHAR_MAX 0xff
|
||||
|
||||
#ifndef __CHAR_UNSIGNED__
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define CHAR_MAX SCHAR_MAX
|
||||
#else
|
||||
#define CHAR_MIN 0
|
||||
#define CHAR_MAX UCHAR_MAX
|
||||
#endif
|
||||
|
||||
#define MB_LEN_MAX 5
|
||||
#define SHRT_MIN (-32768)
|
||||
|
||||
Reference in New Issue
Block a user