aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/foul-scalar.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2022-06-26 23:36:26 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2022-06-27 15:30:26 +0200
commitd33c81e7b6f32c4cb9a0d7ba20ee4eb875dfc44f (patch)
treeefb5f0e7712ffc8b7a225d5c21c61d7e274d7ffd /validation/foul-scalar.c
parent346ad756651e6c7c72f3012a4e1d57a49c327bc4 (diff)
downloadsparse-dev-bitwise-ones.tar.gz
bitwise: early expansion of simple constantsbitwise-ones
C has only positive constants: -1 is really an expression, the unary '-' operator applied to the constant 1. '-1' as a constant value only exists after the expansion of constant expressions. This is rather unfortunate since it inhibits easy testing of such constants in the evaluation phase, like here for restricted_value(). So, expand expressions like +CTE, -CTE or ~CTE before calling restricted_value(). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/foul-scalar.c')
0 files changed, 0 insertions, 0 deletions