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

This is rather unfortunate since it inhibits easy testing
of such constants in the evaluation phase, like here for

So, expand expressions like +CTE, -CTE or ~CTE before
calling restricted_value().

Signed-off-by: Luc Van Oostenryck <>
3 files changed