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]

Possible spurious warning for isdigit() under sparc-sun-solaris2.5.1 and egcs 110597?


The following macro in <ctype.h> (both in /usr/include, and egcs's fixed
version):

#define isdigit(c)      ((__ctype + 1)[c] & _N)   

makes egcs -Wall emit a warning that the subscript is a char every time
isdigit is used on a char.  First of all, perhaps this is a bug, not a
feature.  But it seems like making Wall warn on every use of ischar,
isdigit, etc, is bad.  Maybe fixincludes should add a cast?  (Excuse me
if this has already been discussed - I have been following the list, but
sometimes intermittently.

-Daniel Eisenbud

-- 
Daniel Eisenbud
eisenbud@cs.swarthmore.edu


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