4 ms·
cppreference is documenting the standards and hasn't lots of information about specific implementations. Technically, this issue is already covered by saying "
by bhaak 11y ago
cppreference is documenting the standards and hasn't lots of information about specific implementations.
Technically, this issue is already covered by saying "The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF."
But in reality it is of course hilarious if a simple function like isblank() can crash if though it only check (in the default locale) if its parameter is equal to 9 or 32.
I also checked other libc implementations (IIRC the BSD, OSX, dietlibc and Bionic) and none of the others did crash or even produce surprising results with values outside of the defined range.