linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] bits_in_bool should be 8
@ 2016-11-14 20:50 Jeff Layton
  2016-11-15  0:23 ` Christopher Li
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2016-11-14 20:50 UTC (permalink / raw)
  To: linux-sparse

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-15  2:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-14 20:50 [RFC PATCH] bits_in_bool should be 8 Jeff Layton
2016-11-15  0:23 ` Christopher Li
2016-11-15  2:27   ` Jeff Layton

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).