Sender: vheyndri AT rug DOT ac DOT be Message-Id: <34D72299.3037@rug.ac.be> Date: Tue, 03 Feb 1998 14:58:49 +0100 From: Vik Heyndrickx Mime-Version: 1.0 To: DJ Delorie Cc: eliz AT is DOT elta DOT co DOT il, djgpp-workers AT delorie DOT com Subject: Re: char != unsigned char... sometimes, sigh References: <199802031335 DOT IAA27878 AT delorie DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk DJ Delorie wrote: > Unsigned char cannot hold a negative value. SGI uses unsigned char, > and this hits me a *lot*. Many programs test for this during > configure and use different code (or at least "signed char") to work > around it. But that is it just it! Program's relying on the signedness of char are non-portable. There is nothing inhibiting any program from using "signed char" explicitely when negative characters are important. And IMHO, I don't call that a work around, but a sensible choice. I cannot imagine that most gnu utilities for example should have to cope with this problem, because they have to run on both kind of architectures. I even cannot imagine why configure should test this since using 'unsigned char' and 'signed char' would take away this problem in the first place. Not accepted as a good example. -- \ Vik /-_-_-_-_-_-_/ \___/ Heyndrickx / \ /-_-_-_-_-_-_/