| ... | ... | @@ -1099,8 +1099,17 @@ static AstNode *trans_binary_operator(Context *c, bool result_used, AstNode *blo |
| 1099 | 1099 | emit_warning(c, stmt->getLocStart(), "TODO handle more C binary operators: BO_OrAssign"); |
| 1100 | 1100 | return nullptr; |
| 1101 | 1101 | case BO_Comma: |
| 1102 | | emit_warning(c, stmt->getLocStart(), "TODO handle more C binary operators: BO_Comma"); |
| 1103 | | return nullptr; |
| 1102 | { |
| 1103 | block = trans_create_node(c, NodeTypeBlock); |
| 1104 | AstNode *lhs = trans_expr(c, false, block, stmt->getLHS(), TransRValue); |
| 1105 | if (lhs == nullptr) return nullptr; |
| 1106 | block->data.block.statements.append(maybe_suppress_result(c, false, lhs)); |
| 1107 | AstNode *rhs = trans_expr(c, result_used, block, stmt->getRHS(), TransRValue); |
| 1108 | if (rhs == nullptr) return nullptr; |
| 1109 | block->data.block.statements.append(maybe_suppress_result(c, result_used, rhs)); |
| 1110 | block->data.block.last_statement_is_result_expression = true; |
| 1111 | return block; |
| 1112 | } |
| 1104 | 1113 | } |
| 1105 | 1114 | |
| 1106 | 1115 | zig_unreachable(); |