linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Pfaff <blp@nicira.com>
To: linux-sparse@vger.kernel.org
Subject: comparisons yield bool instead of int?
Date: Fri, 13 Jul 2012 14:49:32 -0700	[thread overview]
Message-ID: <20120713214932.GJ31844@nicira.com> (raw)

The C standard says that equality operators yield "int", but sparse
thinks that they yield "bool":

    blp@sigsegv:~/sparse$ cat test.c
    static void f(void)
    {
       sizeof(1 == 2);
    }
    blp@sigsegv:~/sparse$ ./sparse test.c
    test.c:3:4: warning: expression using sizeof bool
    blp@sigsegv:~/sparse$ git rev-parse HEAD
    970d7169d75068146152ba01a66381c800dbeb71

Thanks,

Ben.

                 reply	other threads:[~2012-07-13 21:49 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=20120713214932.GJ31844@nicira.com \
    --to=blp@nicira.com \
    --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 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).