GCC char* bug
Joseph S. Myers
jsm28@cam.ac.uk
Sat Jul 21 08:38:00 GMT 2001
On Sat, 21 Jul 2001, Bruce Korb wrote:
> This should _never_ abort on a platform where libc and
> the compiler agree on the sign-ed-ness of char. It
> aborts on Linux with GCC. My claim is that that is wrong.
> Either getc/fgetc needs fixing, or GCC does. Either way.
Re-read the specification of fgetc (C99 subclause 7.19.7.1). It returns
"an unsigned char converted to an int".
--
Joseph S. Myers
jsm28@cam.ac.uk
More information about the Gcc-bugs
mailing list