According to C11, Section 7.4 [ISO/IEC 9899:2011],
The header
<ctype.h>
declares several functions useful for classifying and mapping characters. In all cases the argument is anint
, the value of which shall be representable as anunsigned char
or shall equal the value of the macroEOF
. If the argument has any other value, the behavior is undefined.
...
The argument to isspace()
must be EOF
or representable as an unsigned char
; otherwise, the result is undefined.
...
CERT C++ Secure Coding Standard: STR37-CPP. Arguments to character handling functions must be representable as an unsigned char
ISO/IEC 9899:2011 Section Section 7.4, "Character handling <ctype.h
>"
...