public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: "Kok, Auke" <auke-jan.h.kok@intel.com>
Cc: Richard Knutsson <ricknu-0@student.ltu.se>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Josh Triplett <josh@freedesktop.org>
Subject: Re: generic bool and sparse errors?
Date: Wed, 6 Jun 2007 21:24:09 +0100	[thread overview]
Message-ID: <20070606202409.GY4095@ftp.linux.org.uk> (raw)
In-Reply-To: <46671668.4090805@intel.com>

On Wed, Jun 06, 2007 at 01:17:44PM -0700, Kok, Auke wrote:
> well the sparse warning is about signedness. Either sparse needs to "know" 
> that bool is unsigned, or the kernel headers need to somehow make bool 
> unsigned... the latter choice would come down to just that, but it doesn't 
> look like a good idea to me either somehow.

sparse treats _Bool as 1-bit integer type.  It's considerably more
complicated beast; for one thing (_Bool)2 is 1, not 0.  For another,
several places make unpleasant assumptions that size in bits is a
multiple of bits_in_char.  Which would be fine, but sparse has it
set to 1 for _Bool.  With obvious results...

      reply	other threads:[~2007-06-06 20:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-06 18:29 generic bool and sparse errors? Kok, Auke
2007-06-06 19:00 ` Jeff Garzik
2007-06-06 19:19 ` Richard Knutsson
2007-06-06 20:17   ` Kok, Auke
2007-06-06 20:24     ` Al Viro [this message]

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=20070606202409.GY4095@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=auke-jan.h.kok@intel.com \
    --cc=josh@freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ricknu-0@student.ltu.se \
    --cc=torvalds@linux-foundation.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