From: Linus Torvalds <torvalds@osdl.org>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: New and bogus(!) warning produced by sparse.
Date: Fri, 30 Sep 2005 07:34:55 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0509300730500.3378@g5.osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0509300727450.3378@g5.osdl.org>
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
next prev parent reply other threads:[~2005-09-30 14:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-30 14:03 Anton Altaparmakov
2005-09-30 14:29 ` Linus Torvalds
2005-09-30 14:34 ` Linus Torvalds [this message]
2005-09-30 15:37 ` Linus Torvalds
2005-09-30 15:48 ` Anton Altaparmakov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0509300730500.3378@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=aia21@cam.ac.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®