Subject: Re: some unusual errors
From: [email-masked] (J. J. Farrell)

21 Sep 1998 02:23:49 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
Content-Type: text
To: [email-masked] (Michael Richardson)
Cc: [email-masked]

> Date: Fri, 18 Sep 1998 16:05:13 -0300
> From: Michael Richardson <[email-masked]>
> 
> 
> 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
"[email-masked]" with one line of text: "help".