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

From: Tomas Szepe
Date: Thu Jan 01 2004 - 20:02:06 EST


On Jan-01 2004, Thu, 19:46 -0500
Trond Myklebust <trond.myklebust@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/