lkml.org 
[lkml]   [2005]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: New and bogus(!) warning produced by sparse.


On Fri, 30 Sep 2005, Linus Torvalds wrote:
>
> I see why it happens, will fix sparse momentarily (btw, for sparse bugs,
> use "linux-sparse@vger.kernel.org" rather than LKML - since this is
> clearly not a kernel problem ;)

Side note: it has nothing to do with bit-fields: it happens for any
structure member that sparse will have incorrectly figured out as having a
value pre-assigned to it. So even

struct {
int value;
} dummy = { 0 };

dummy.value = 1;

will generate the warning. It isn't that a bitfield cannot have it's
address taken, it's that sparse has incorrectly "optimized" dummy.value to
be 0, so it ends up evaluating it as

0 = 1;

and says that it's trying to assign a non-lvalue.. Very stupid.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.086 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site