Skip to content

Commit 67e1ea9

Browse files
committed
Fix the result type for conditional of comma expression
1 parent c543438 commit 67e1ea9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/cc/frontend/fe_misc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,7 @@ Expr *make_cond(Expr *expr) {
14431443
break;
14441444
case EX_COMMA:
14451445
expr->bop.rhs = make_cond(expr->bop.rhs);
1446+
expr->type = expr->bop.rhs->type;
14461447
break;
14471448
default:
14481449
switch (expr->type->kind) {

0 commit comments

Comments
 (0)