char array subscript in ctype

Peter Naulls peter at chocky.org
Sat Dec 29 14:24:46 PST 2001


When using libscl and certain combinations of warnings, the ctype
isspace, etc. macros may give warnings about subscripts being of type
'char'.

I suggest a suitable cast in each macro.  e.g.:

#define isgraph(c) (__ctype[(unsigned int)c] & 58)

Peter

-- 
------------------------------------------------------------------------
 Peter Naulls - peter at chocky.org
 RISC OS Projects Initiative  -  http://www.chocky.org/initiative/
 Java for RISC OS and ARM     -  http://www.chocky.org/java/
 Debian Linux on RiscPCs      -  http://www.chocky.org/debian/
------------------------------------------------------------------------



More information about the gcc mailing list