Re: [PATCH] disable gcc warnings of sign/unsigned comparison

Tomas Szepe
2004-01-02T01:00:39Z

On Jan-01 2004, Thu, 19:46 -0500
Trond Myklebust <trond.myklebust@fys.uio.no> wrote:

> P? to , 01/01/2004 klokka 18:15, skreiv Paul Jackson:
>
> > Have you knowledge that more recent versions of gcc don't complain
> > nearly as much of this warning? If so, I will upgrade my gcc and shut
> > up.
>
> I haven't checked with Andrew's '-mm' kernels, but AFAICS I'm not seeing
> any lingering signed/unsigned warnings in the stock 2.6.0 kernel -
> certainly not as many as 1386... (GCC version is latest 3.3.3 prerelease
> from Debian).

I'm not sure, but wasn't this kind of warning moved
from under '-Wall' to under '-W'?

gcc 3.3.2's manpage says:

-W Print extra warning messages for these events:

...

o A comparison between signed and unsigned values
could produce an incorrect result when the signed
value is converted to unsigned. (But don't warn
if -Wno-sign-compare is also specified.)

--
Tomas Szepe <szepe@pinerecords.com>