some unusual errors

Stephen Vance
Mon Sep 21 15:22:00 GMT 1998

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                           |
Deneb Robotics, Inc.                    |
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
"" with one line of text: "help".

More information about the Cygwin mailing list