This is the mail archive of the gcc@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: egcs/fortran warnings (Was : possible spurious warning for isdigit)


   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


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