Source-Changes-D archive

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

Re: CVS commit: src/lib/libc/stdio



On Thu, Mar 22, 2012 at 02:36:03 +0000, Christos Zoulas wrote:

> In article <20120322013932.GA24929%britannica.bec.de@localhost>,
> Joerg Sonnenberger  <joerg%britannica.bec.de@localhost> wrote:
> >> 
> >> What's is wrong with it?
> >
> >It should be unnecessary. CHAR_MAX is certainly required to fit into
> >both char and unsigned char.
> 
> Yes, the issue here being that lint is saying that if char is signed
> the constant 0xff does not fit; at the point lint looks at the assignment
> CHAR_MAX is 255.

Isn't that literally schizophrenic?  If char is signed, CHAR_MAX
cannot be 255.  If lint expands CHAR_MAX and operates on its value,
then the check it tries to do is bogus.

-uwe


Home | Main Index | Thread Index | Old Index