diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-12-20 18:23:54 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-12-20 23:49:13 +0100 |
commit | 003116e1263d9a0cdb9b8171caba225710faa4a6 (patch) | |
tree | 421f2854291a498c627bfd32c131850c97e0cc63 | |
parent | b19ebd8c84c58c3b19c13a20f4efe180e41ac540 (diff) | |
download | sparse-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |