bitwise: early expansion of simple constants
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>
3 files changed