We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abe64c5 commit 1e8044fCopy full SHA for 1e8044f
1 file changed
src/frontc/cabs2cil.ml
@@ -5239,7 +5239,7 @@ and doCondExp (asconst: bool) (* Try to evaluate the conditional expression
5239
| _ ->
5240
let (se, e, t) = doExp asconst e (AExp None) in
5241
ignore (checkBool t e);
5242
- CEExp (se, if !lowerConstants then constFold asconst e else e)
+ CEExp (se, if !lowerConstants || asconst then constFold asconst e else e)
5243
5244
and compileCondExp (asconst:bool) (ce: condExpRes) (st: chunk) (sf: chunk) : chunk =
5245
match ce with
0 commit comments