diff options
author | Joe Perches <joe@perches.com> | 2014-02-26 19:19:25 -0800 |
---|---|---|
committer | Christopher Li <sparse@chrisli.org> | 2014-02-27 12:39:44 -0800 |
commit | 2667c2d4ab3342b54283d16f1d62e6d715f3b373 (patch) | |
tree | a5ae6428d932b074f47f41fb734e1a24f163bbb1 /evaluate.c | |
parent | 67a7f893b14526002afc0b478a744cfb4acbfebe (diff) | |
download | sparse-2667c2d4ab3342b54283d16f1d62e6d715f3b373.tar.gz |
sparse: Allow override of sizeof(bool) warning
Allow an override to emit or not the sizeof(bool) warning.
Add a "-Wsizeof-bool" description to the manpage.
Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'evaluate.c')
-rw-r--r-- | evaluate.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2057,7 +2057,8 @@ static struct symbol *evaluate_sizeof(struct expression *expr) } if (size == 1 && is_bool_type(type)) { - warning(expr->pos, "expression using sizeof bool"); + if (Wsizeof_bool) + warning(expr->pos, "expression using sizeof bool"); size = bits_in_char; } |