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

> In article <20120322013932.ga24...@britannica.bec.de>,
> Joerg Sonnenberger  <jo...@britannica.bec.de> 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

Reply via email to