diff --git a/lang/cem/cemcom/eval.c b/lang/cem/cemcom/eval.c index ce0e95773..cf8761669 100644 --- a/lang/cem/cemcom/eval.c +++ b/lang/cem/cemcom/eval.c @@ -73,8 +73,16 @@ EVAL(expr, val, code, true_label, false_label) switch (expr->ex_class) { case Value: /* just a simple value */ - if (gencode) - load_val(expr, val); + if (gencode) { + if (true_label) { + /* can only result from ','-expressions with + constant right-hand sides ??? + */ + ASSERT(is_cp_cst(expr)); + C_bra(expr->VL_VALUE == 0 ? false_label : true_label); + } + else load_val(expr, val); + } break; case String: /* a string constant */ if (gencode) {