Re: potential runtime problem on arm, powerpc and s390 due to incorrect assumption on char signedness

2002-01-15 Thread Colin Walters
On Mon, 2002-01-14 at 21:41, Peter Cordes wrote: > For software with problems like that all over the place, you could use > gcc -fsigned-char [...] Nooo! This is a bad idea, unless you're in a freestanding environment, and even then it should be avoided. See the previous thread.

Re: potential runtime problem on arm, powerpc and s390 due to incorrect assumption on char signedness

2002-01-14 Thread Peter Cordes
On Sun, Jan 13, 2002 at 08:20:20PM +0100, Gerhard Tonn wrote: > In other contexts the right solution is to make the type of the variable > 'signed char'. For software with problems like that all over the place, you could use gcc -fsigned-char if you don't have time to track down the individual b

Re: potential runtime problem on arm, powerpc and s390 due to incorrect assumption on char signedness

2002-01-13 Thread Peter Mathiasson
On Sun, Jan 13, 2002 at 08:46:44PM +0100, Wichert Akkerman wrote: > Previously Gerhard Tonn wrote: > > >>The following code fragment will ignore the end-of-file when char is > > >>implemented using unsigned char, due to internal conversions between data > > >>types: > > >> > > >>ch

Re: potential runtime problem on arm, powerpc and s390 due to incorrect assumption on char signedness

2002-01-13 Thread Wichert Akkerman
Previously Gerhard Tonn wrote: > >>The following code fragment will ignore the end-of-file when char is > >>implemented using unsigned char, due to internal conversions between data > >>types: > >> > >>char c; > >>while ((c = getchar()) != EOF) > >>