diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-03-03 10:59:40 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-03-03 11:17:47 +0100 |
commit | 7fd3778e2d3a7b17aefea66819bf07feb7a257d3 (patch) | |
tree | 1f6585825efa0db36357dce2c710fb2aad757c5d | |
parent | 5374221b943f36cd9d18ab80a09c3d15b350a3f3 (diff) | |
download | sparse-7fd3778e2d3a7b17aefea66819bf07feb7a257d3.tar.gz |
expand: add explanation to 'conservative'
The variable 'conservative' is used to allow testing some
characteristics of an expression while inhibiting any possible
side-efects like issuing a warning or marking the expression
as erroneous. But this role is not immedialtely apparent.
So, add a comment to the variable declaration.
Suggested-by: Thomas Weißschuh <thomas@t-8ch.de>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | expand.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -47,6 +47,11 @@ static int expand_expression(struct expression *); static int expand_statement(struct statement *); + +// If set, don't issue a warning on divide-by-0, invalid shift, ... +// and don't mark the expression as erroneous but leave it as-is. +// This allows testing some characteristics of the expression +// without creating any side-effects (e.g.: is_zero_constant()). static int conservative; static int expand_symbol_expression(struct expression *expr) |