DragonFly BSD
DragonFly commits List (threaded) for 2005-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: ctype bug


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Thu, 7 Jul 2005 02:04:04 +0200
Mail-followup-to: commits@crater.dragonflybsd.org

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]