On Sun, 23 Jan 2005, Randy.Dunlap wrote:
>
> I had proposed a kernel patch to TASK_SIZE on x86_64 to
> eliminate 3,214 (!) sparse warnings in 2.6.11-rc2, but
> Andi thinks this is a sparse (data type) bug.  Comments?

It's not a sparse bug - sparse correctly notices that the constant is
"long", and it very much on purpose warns about it. A lot of people don't
know what the conversion rules for big constants are (they are _different_
from all other conversion rules, and as an example, hex constants act
differently from decimal constants).

So the warning is the same kind of warning as "don't use assignments in 
logical expression" - the code isn't wrong per se, but the code is 
definitely open to surprising behaviour.

                Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to