This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: some unusual errors
- To: Michael Richardson <mcr at solidum dot com>
- Subject: Re: some unusual errors
- From: "Lassi A. Tuura" <lat at iki dot fi>
- Date: Tue, 22 Sep 1998 14:27:21 +0200 (METDST)
- cc: Michael Hirmke <mh at mike dot franken dot de>, gnu-win32 at cygnus dot com
- Reply-To: "Lassi A. Tuura" <lat at iki dot fi>
|> Why would you say "unsigned char"??
|> It says "int" to me.
|> So, a signed char should promote to int just fine.
The only negative value allowed with these functions is EOF (if it is
negative)---see the quotes earlier in this thread. If you have a signed
character that really is negative, it will promote to a negative integer
and you end up with undefined behaviour. gcc is nice enough to give you
a warning about that. You need to cast the character to `unsigned char'
before using it in the is* predicates.
Cheers,
//lat
--
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going
to land, and it could be dangerous sitting under them as they fly
overhead. --RFC1925, "The Twelve Networking Truths"
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".