mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-21 16:29:31 +00:00
Omit all non-standard stuff from <ctype.h> if __KeepNamespacePure__ is defined.
This affects the toint function and the _tolower and _toupper macros. Several other non-standard functions and macros were already being omitted.
This commit is contained in:
parent
bb51e77193
commit
e4515e580a
@ -81,11 +81,13 @@ int isblank(int);
|
||||
#define isblank(c) ((__ctype2)[(c)+1] & __blank)
|
||||
#ifndef __KeepNamespacePure__
|
||||
#define toascii(c) ((c) & 0x7F)
|
||||
int toint(char);
|
||||
#endif
|
||||
int toint(char);
|
||||
int tolower(int);
|
||||
int toupper(int);
|
||||
#define _tolower(c) ((c) | 0x20)
|
||||
#define _toupper(c) ((c) & 0x5F)
|
||||
#ifndef __KeepNamespacePure__
|
||||
#define _tolower(c) ((c) | 0x20)
|
||||
#define _toupper(c) ((c) & 0x5F)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
2
cc.notes
2
cc.notes
@ -1172,7 +1172,7 @@ int foo(int[42]);
|
||||
|
||||
146. In initializers for static data, expressions where an integer with unsigned type was added to an array address (e.g. "a + 1U") would not be accepted.
|
||||
|
||||
147. The <string.h> header includes several non-standard functions. Their declarations should be omitted if __KeepNamespacePure__ is defined.
|
||||
147. The <string.h> and <ctype.h> headers include several non-standard functions and macros. Their declarations and definitions should be omitted if __KeepNamespacePure__ is defined.
|
||||
|
||||
148. When an expression that the intermediate code peephole optimizer could reduce to a constant was cast to a character type, the resulting value could be outside the range of that type.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user