Subject: Re: some unusual errors
From: [email-masked] (Stephen Vance)

22 Sep 1998 05:57:46 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Michael Richardson <[email-masked]>
Cc: [email-masked]

Michael Richardson wrote:

> 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???

The reason isspace() and friends are defined this way is that special characters like EOF are not always represented by "char".  The standard
leaves the choice of "signed char" or "unsigned char" as the default "char" as implementation defined.  EOF is usually -1.  If you want 8-bit
chars, -1 maps to an already defined char in either representation, but as an int it is distinct.

--
Stephen Vance                           |  http://www.deneb.com
Deneb Robotics, Inc.                    |  mailto:[email-masked]
5500 New King Street                    |  Phone: (248) 267-9696
Troy, MI 48098-2615                     |  Fax:   (248) 267-8585

What is done well is done quickly enough. -Augustus Caesar

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".