ctype bug

Joerg Sonnenberger joerg at britannica.bec.de
Wed Jul 6 17:05:36 PDT 2005


On Wed, Jul 06, 2005 at 04:45:08PM -0700, Matthew Dillon wrote:
>     We are not doing this.  There is nothing wrong with having a signed char.
>     There was NEVER anything wrong with having a signed char.  Chars are 
>     simply 8 bit quantities.  If shorts, ints, and longs are signed, then
>     why should we treat chars any differently?  I say we shouldn't, and in
>     fact that it is a mistake to.  The C language was badly designed when it 
>     tried to make 'char' represent an 8 bit quantity AND a character at the
>     same type.  That's just the way it is, we have to live with it.  We
>     cannot enforce a purist view on the world just because relatively
>     recent standards have finally added types to distinguish the two.

Matt, the ctype macros ALWAYS worked like this, at the very least back to
the days of 4.4BSD. THIS IS NOT NEW. Just because some programmers don't like
reading the documentation and follow what is clearly written there, doesn't mean
that arbitrary changes are correct.

Joerg





More information about the Commits mailing list