linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: linux-sparse <linux-sparse@vger.kernel.org>
Cc: Vladislav Bolkhovitin <vst@vlnb.net>
Subject: Sparse complains about __constant_cpu_to_be32(1)
Date: Sat, 30 Oct 2010 11:57:09 +0200	[thread overview]
Message-ID: <AANLkTin2dPQQNaGC48QrvxU0dZvYf1znC442v0gBGUQ0@mail.gmail.com> (raw)

Hello,

Even with the most recent sparse version, I see the following when
running sparse on an x86_64 system:
* sparse does not complain about __constant_cpu_to_be32(0xFFFFFFFF),
as expected.
* sparse complains about __constant_cpu_to_be32(1), which I did not
expect. The warning sparse prints is:

warning: cast truncates bits from constant value (1000000 becomes 0)

Can anyone tell me whether that's a bug or a feature ?

Thanks,

Bart.

                 reply	other threads:[~2010-10-30  9:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=AANLkTin2dPQQNaGC48QrvxU0dZvYf1znC442v0gBGUQ0@mail.gmail.com \
    --to=bvanassche@acm.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=vst@vlnb.net \
    /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;
as well as URLs for NNTP newsgroup(s).