From 62132ecc8d032ef251d6b54177414a9ba29e8610 Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 13 Aug 2022 07:27:37 +0200 Subject: fix cgen cond --- bootstrap/cgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap/cgen.c') diff --git a/bootstrap/cgen.c b/bootstrap/cgen.c index baf8999..b164905 100644 --- a/bootstrap/cgen.c +++ b/bootstrap/cgen.c @@ -215,7 +215,7 @@ genexpr(struct expr *ex) { pri("(%e %c %e)", ex->binop.lhs, ex->binop.op, ex->binop.rhs); break; case Econd: - pri("(%e) ? (%e) : (%e)", ex->cond.test, ex->cond.t, ex->cond.f); + pri("((%e) ? (%e) : (%e))", ex->cond.test, ex->cond.t, ex->cond.f); break; case Ecall: pri("%e(", ex->call.callee); -- cgit v1.2.3