aboutsummaryrefslogtreecommitdiffhomepage
path: root/c/c.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/c.c')
-rw-r--r--c/c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/c/c.c b/c/c.c
index b6ca90e..05308e1 100644
--- a/c/c.c
+++ b/c/c.c
@@ -1080,7 +1080,7 @@ Unary:
assert(ty.t);
ex = mkexpr(ek, span, ty, .sub = exprdup2(cm, &ex, &rhs));
} else {
- /* ex ? tmp : rhs */
+ /* logical-OR-expression ? expression : conditional-expression */
struct expr *sub;
span.sl = tk.span.sl;
span.ex = ex.span.ex;
@@ -1089,7 +1089,7 @@ Unary:
tmp = commaexpr(cm);
joinspan(&tk.span.ex, tmp.span.ex);
expect(cm, ':', NULL);
- rhs = expr(cm);
+ rhs = exprparse(cm, opprec, NULL, 0);
if (!joinspan(&span.ex, tk.span.ex) || !joinspan(&span.ex, tmp.span.ex)
|| !joinspan(&span.ex, rhs.span.ex))
span.ex = tk.span.ex;