Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 an int, the value of which shall be representable as an unsigned char or shall equal the value of the macro EOF. 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>"

...