fgetc doubts
James Bailie
jimmy at mammothcheese.ca
Tue Mar 10 15:59:19 PDT 2009
I must correct myself. It's more likely the return value of fgetc(),
after having been assigned to a char, is being sign-extended when that
char is compared to the in EOF, so that the comparison becomes a
comparison between 0xffffffff and 0xffffffff.
James Bailie wrote:
> ...EOF is getting cast to a char implicitly in the comparison, so the
> comparison becomes a comparison between 0xff and 0xff.
--
James Bailie <jimmy at mammothcheese.ca>
http://www.mammothcheese.ca
More information about the freebsd-hackers
mailing list