Re: avoid compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



According to H. Peter Anvin on 8/11/2009 10:33 AM:
> Herbert... the *type* is int, but the *value* has to be in the range
> [-1,UCHAR_MAX] or the behavior is undefined in both the C and POSIX
> standards.

Actually, the *value* has to be either EOF (which is negative, but not
necessarily required to be -1) or [0,UCHAR_MAX].  But you are correct that
for most (all?) platforms, EOF is -1 even though it is not mandated as such.

-- 
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@xxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux