authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-07-08 15:15:08-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-07-08 15:15:08-07:00
logc1c49a7d1c4195d8fd981754042eaca17745b8f4
treea8ddd371dd300814c7e204ad95b4118b514dc5d3
parent1dcb20d27e024660d8c75e427cf5e251e3833cac

C backend: fix bitcasting regression


1 files changed, 1 insertions(+), 7 deletions(-)

src/codegen/c.zig+1-7
...@@ -5196,13 +5196,7 @@ fn bitcast(f: *Function, dest_ty: Type, operand: CValue, operand_ty: Type) !CVal...@@ -5196,13 +5196,7 @@ fn bitcast(f: *Function, dest_ty: Type, operand: CValue, operand_ty: Type) !CVal
5196 const operand_lval = if (operand == .constant) blk: {5196 const operand_lval = if (operand == .constant) blk: {
5197 const operand_local = try f.allocLocal(null, operand_ty);5197 const operand_local = try f.allocLocal(null, operand_ty);
5198 try f.writeCValue(w, operand_local, .Other);5198 try f.writeCValue(w, operand_local, .Other);
5199 if (operand_ty.isAbiInt(zcu)) {5199 try w.writeAll(" = ");
5200 try w.writeAll(" = ");
5201 } else {
5202 try w.writeAll(" = (");
5203 try f.renderType(w, operand_ty);
5204 try w.writeByte(')');
5205 }
5206 try f.writeCValue(w, operand, .Other);5200 try f.writeCValue(w, operand, .Other);
5207 try w.writeByte(';');5201 try w.writeByte(';');
5208 try f.object.newline();5202 try f.object.newline();