Mail Archives: cygwin/1998/09/21/02:23:49
> Date: Fri, 18 Sep 1998 16:05:13 -0300
> From: Michael Richardson <mcr AT solidum DOT com>
>
>
> I get a lot of warnings like this:
>
> strtod.c:1239: warning: subscript has type `char'
>
> This line of code is actually:
>
> for(s = s00; isspace(*s); s++)
>
> which confuses me. What, if not "char" should isspace() take???
isspace() takes an int whose value must be in the range 0 to
UCHAR_MAX, or EOF.
This looks like a bug in the macro implementation of isspace(),
to me; it should be casting the parameter to int so it will
behave in the same way as the function implementation. Until
a fix appears, your options are:
- to fix the bug in your installation by casting the parameter to
an int in the macro definition of isspace() in ctype.h
- to force the call to use the function implementation of isspace()
by putting
#undef isspace
before you use it, or by putting parenthesis around the name in
the call
(isspace)(*s)
- or to explicitly cast the parameter to an int.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -