This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: GCC char* bug
- To: Bruce Korb <bkorb at pacbell dot net>
- Subject: Re: GCC char* bug
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Sat, 21 Jul 2001 16:38:24 +0100 (BST)
- cc: Geoff Keating <geoffk at geoffk dot org>, <gcc-bugs at gcc dot gnu dot org>
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