From: jjf@hal.com (J. J. Farrell)
Subject: Re: some unusual errors
21 Sep 1998 02:23:49 -0700
Message-ID: <199809210056.RAA27963.cygnus.gnu-win32@aleph.ssd.hal.com>
References: <199809182005.QAA03634@venus.solidum.com>
Content-Type: text
To: mcr@solidum.com (Michael Richardson)
Cc: gnu-win32@cygnus.com

> Date: Fri, 18 Sep 1998 16:05:13 -0300
> From: Michael Richardson <mcr@solidum.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@cygnus.com" with one line of text: "help".
