Fix: did generate wrong code for 'if (x && 0) ...'
This commit is contained in:
parent
99e74b2341
commit
2782412b59
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue