On Tue, Mar 27, 2012 at 22:53:47 +0000, Christos Zoulas wrote: > In article <20120327202907.gt26...@bigmac.stderr.spb.ru>, > Valeriy E. Ushakov <u...@stderr.spb.ru> wrote: > > > >But that is not what the code was. The code was: > > > > char c; if (c == CHAR_MAX) ... > > > >and *that* is portable. As I said in another mail to thsi thread that > >went unanswered, it is literally schizophrenic of lint to complain > >about it. > > How can lint know that if (c == 255) is portable? Because CHAR_MAX > gets expanded by cpp to 255 before lint parses the file.
And this is *precisely* why it's fundamentally wrong. It's not 80s any more. CHAR_MAX is there for a reason. -uwe