From: Pekka Enberg <penberg@kernel.org>
To: linux-sparse@vger.kernel.org
Cc: Pekka Enberg <penberg@kernel.org>,
Christopher Li <sparse@chrisli.org>,
Jeff Garzik <jgarzik@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 3/3] Revert "sparse: Bump up sizeof(_Bool) to 8 bits"
Date: Wed, 21 Dec 2011 11:25:28 +0200 [thread overview]
Message-ID: <1324459528-9344-3-git-send-email-penberg@kernel.org> (raw)
In-Reply-To: <1324459528-9344-1-git-send-email-penberg@kernel.org>
This reverts commit 2ded1e7406914eda77abde035416140849d76f68. It's no longer
needed as LLVM backend supports 1-bit integers.
Cc: Christopher Li <sparse@chrisli.org>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
target.c | 2 +-
validation/sizeof-bool.c | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/target.c b/target.c
index 6a535bc..17b228a 100644
--- a/target.c
+++ b/target.c
@@ -14,7 +14,7 @@ int max_alignment = 16;
/*
* Integer data types
*/
-int bits_in_bool = 8;
+int bits_in_bool = 1;
int bits_in_char = 8;
int bits_in_short = 16;
int bits_in_int = 32;
diff --git a/validation/sizeof-bool.c b/validation/sizeof-bool.c
index 71ae1bc..6c68748 100644
--- a/validation/sizeof-bool.c
+++ b/validation/sizeof-bool.c
@@ -4,5 +4,9 @@ static int a(void)
}
/*
* check-name: sizeof(_Bool) is valid
- * check-description: sizeof(_Bool) is valid
+ * check-description: sizeof(_Bool) was rejected because _Bool is not an even
+ * number of bytes
+ * check-error-start
+sizeof-bool.c:3:16: warning: expression using sizeof bool
+ * check-error-end
*/
--
1.7.6.4
prev parent reply other threads:[~2011-12-21 9:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 9:25 [PATCH 1/3] sparse, llvm: Use LLVMInt1Type() in sym_basetype_type() Pekka Enberg
2011-12-21 9:25 ` [PATCH 2/3] sparse, llvm: Add test case for <stdbool.h> type Pekka Enberg
2011-12-21 9:58 ` Josh Triplett
2011-12-21 10:18 ` Pekka Enberg
2011-12-22 0:23 ` Christopher Li
2011-12-22 5:53 ` Pekka Enberg
2011-12-21 9:25 ` Pekka Enberg [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=1324459528-9344-3-git-send-email-penberg@kernel.org \
--to=penberg@kernel.org \
--cc=jgarzik@redhat.com \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.org \
--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 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.