tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] What does 0xFF mean?


From: Vincent Lefevre
Subject: Re: [Tinycc-devel] What does 0xFF mean?
Date: Fri, 27 Jun 2014 16:20:11 +0200
User-agent: Mutt/1.5.21-6305-vl-r59709 (2013-04-16)

On 2014-06-27 21:56:39 +0800, YX Hao wrote:
> > > I think I've already seen such a bug with some software, probably
> > > because it wasn't detecting EOF (-1) correctly.
> 
> Even if it is a "0xFF", it should not be the EOF, though many people
> say it. You can make a file to test using my attachment. ;)

Yes, that's why I say above that it is a bug. I think that some
developers *incorrectly* store the result of fgetc() to a char
instead of an int, in which case 0xFF can't be distinguished from
EOF.

-- 
Vincent Lefèvre <address@hidden> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]