[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.10.0804271335330.3119@woody.linux-foundation.org>
Date: Sun, 27 Apr 2008 13:38:34 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Harvey Harrison <harvey.harrison@...il.com>
cc: Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] bitops: simplify generic bit finding functions
On Sun, 27 Apr 2008, Harvey Harrison wrote:
>
> Oh, I didn't realize, I only did this because sparse started spewing out
> lots of:
> include/linux/bitops.h:166:32: warning: shift too big (65536) for type unsigned long
Well, that's really just a sparse bug/misfeature that didn't matter
before.
It happens because the warning is done as part of constant expression
evaluation, but then the expression isn't actually *used*, so when we
optimize it away - at a later date - it's too late to undo the warning.
I don't rightly know how to fix it. We do want to do the constant
evaluation early (since all the optimizations that may then make it a
non-issue depends on constants being constants!), but in order to not
output the warning we'd have to turn the constant into a "constant with
warning 'xyz' if used".
Which we have no support for in sparse yet.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists