This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC char* bug


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]