From: Jeff Layton <jlayton@redhat.com>
To: linux-sparse@vger.kernel.org
Subject: [RFC PATCH] bits_in_bool should be 8
Date: Mon, 14 Nov 2016 15:50:43 -0500 [thread overview]
Message-ID: <1479156643-28563-1-git-send-email-jlayton@redhat.com> (raw)
Given that we're working with byte-addressable machines, each type must
be at least one byte in size or you'd not be able to take a pointer to
it.
Noticed at random when I ran the sample "compile" program in the
sparse source tree vs. a test C program that uses bools. It crashes
without this patch.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target.c b/target.c
index 17b228ae924c..6a535bc0b2d7 100644
--- a/target.c
+++ b/target.c
@@ -14,7 +14,7 @@ int max_alignment = 16;
/*
* Integer data types
*/
-int bits_in_bool = 1;
+int bits_in_bool = 8;
int bits_in_char = 8;
int bits_in_short = 16;
int bits_in_int = 32;
--
2.7.4
next reply other threads:[~2016-11-14 20:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 20:50 Jeff Layton [this message]
2016-11-15 0:23 ` [RFC PATCH] bits_in_bool should be 8 Christopher Li
2016-11-15 2:27 ` Jeff Layton
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=1479156643-28563-1-git-send-email-jlayton@redhat.com \
--to=jlayton@redhat.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).