Possible spurious warning for isdigit() under sparc-sun-solaris2.5.1 and egcs 110597?
Daniel Eisenbud
eisenbud@cs.swarthmore.edu
Sun Nov 9 09:13:00 GMT 1997
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
More information about the Gcc
mailing list