Messages in this thread | | | Date | Fri, 30 Sep 2005 07:34:55 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: 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/
| |