diff options
Diffstat (limited to 'bootstrap/cgen.c')
| -rw-r--r-- | bootstrap/cgen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bootstrap/cgen.c b/bootstrap/cgen.c index 665bdc5..15fab93 100644 --- a/bootstrap/cgen.c +++ b/bootstrap/cgen.c @@ -222,7 +222,7 @@ genexpr(struct expr *ex) { pri("(%e)%c", ex->unop.child, ex->unop.op); break; case Ebinop: - pri("(%e %c %e)", ex->binop.lhs, ex->binop.op, ex->binop.rhs); + pri("((%e) %c (%e))", ex->binop.lhs, ex->binop.op == '?\?' ? '?:' : ex->binop.op, ex->binop.rhs); break; case Econd: pri("((%e) ? (%e) : (%e))", ex->cond.test, ex->cond.t, ex->cond.f); |