This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs/fortran warnings (Was : possible spurious warning for isdigit)
- To: burley at gnu dot org
- Subject: Re: egcs/fortran warnings (Was : possible spurious warning for isdigit)
- From: Ian Lance Taylor <ian at cygnus dot com>
- Date: Mon, 10 Nov 1997 12:56:09 -0500
- CC: phdm at mail dot macqel dot be, eisenbud at cs dot swarthmore dot edu, egcs at cygnus dot com
Date: Mon, 10 Nov 1997 12:52:21 -0500 (EST)
From: Craig Burley <burley@gnu.org>
In the meantime, it seems the right place to fix this is the
<ctype.h> implementations of is* (and maybe to*) functions on
the system(s) that yield these warnings. Maybe all they
need is a cast; or maybe they need a way to properly handle
negative inputs that a simple cast wouldn't solve.
I thought I mentioned this in my earlier message: there is no easy way
for fixincludes to fix these macros in a manner that will work for
both all unsigned char values and for EOF. I suppose we could use
some inefficient hack using gcc expression statements, but I don't see
any efficient way to do it.
Or, let me know if these functions are supposed to accept
int, not char, and I'll change g77 accordingly (though that
would seem to be a painful thing to do, offhand).
The functions take an int argument whose value is either representable
as an unsigned char, or is EOF. gcc is warning when you pass a char,
since when char is sign extended to int it may take on values which
are not representable as an unsigned char.
Ian