summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-12-20 18:23:54 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-12-20 23:49:13 +0100
commit003116e1263d9a0cdb9b8171caba225710faa4a6 (patch)
tree421f2854291a498c627bfd32c131850c97e0cc63
parentb19ebd8c84c58c3b19c13a20f4efe180e41ac540 (diff)
downloadsparse-003116e1263d9a0cdb9b8171caba225710faa4a6.tar.gz
remove redundant check of _Bool bitsize
To test if a type is a variant of _Bool it is useless to test is_bool_type(x) *and* test if 'x->bit_size == 1' since the first implies the second. So, remove the test of the bitsize. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--evaluate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/evaluate.c b/evaluate.c
index 4c8c002e..8841a6e4 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -2207,7 +2207,7 @@ static struct symbol *evaluate_sizeof(struct expression *expr)
size = bits_in_char;
}
- if (size == 1 && is_bool_type(type)) {
+ if (is_bool_type(type)) {
if (Wsizeof_bool)
warning(expr->pos, "expression using sizeof _Bool");
size = bits_in_char;