This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Possible spurious warning for isdigit() under sparc-sun-solaris2.5.1 and egcs 110597?
- To: egcs at cygnus dot com
- Subject: Possible spurious warning for isdigit() under sparc-sun-solaris2.5.1 and egcs 110597?
- From: Daniel Eisenbud <eisenbud at cs dot swarthmore dot edu>
- Date: Sun, 9 Nov 1997 12:13:37 -0500
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