All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: linux-sparse@vger.kernel.org
Subject: sparse considers LONG_MAX too big for long on x86-64
Date: Wed, 24 Aug 2011 20:22:57 -0700	[thread overview]
Message-ID: <20110825032257.GB1944@leaf> (raw)

sizeof(long) == 8 on x86-64, but sparse thinks LONG_MAX needs a long long:

/tmp$ uname -a
Linux leaf 3.0.0-1-amd64 #1 SMP Wed Aug 17 04:08:52 UTC 2011 x86_64 GNU/Linux
/tmp$ cat test.c
#include <limits.h>
#if LONG_MAX < 0
#endif
/tmp$ sparse test.c
test.c:2:5: warning: constant 9223372036854775807L is so big it is long long
/tmp$ cgcc -c test.c -o /dev/null
test.c:2:5: warning: constant 9223372036854775807L is so big it is long long
/tmp$ echo $((2**63 - 1))
9223372036854775807

- Josh Triplett

                 reply	other threads:[~2011-08-25  3:23 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=20110825032257.GB1944@leaf \
    --to=josh@joshtriplett.org \
    --cc=linux-sparse@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.