aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/c.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-07-08 15:15:08 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-07-08 15:15:08 -0700
commitc1c49a7d1c4195d8fd981754042eaca17745b8f4 (patch)
treea8ddd371dd300814c7e204ad95b4118b514dc5d3 /src/codegen/c.zig
parent1dcb20d27e024660d8c75e427cf5e251e3833cac (diff)
downloadzig-c1c49a7d1c4195d8fd981754042eaca17745b8f4.tar.gz
zig-c1c49a7d1c4195d8fd981754042eaca17745b8f4.zip
C backend: fix bitcasting regression
Diffstat (limited to 'src/codegen/c.zig')
-rw-r--r--src/codegen/c.zig8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig
index b58d94e2a3..909269a9c6 100644
--- a/src/codegen/c.zig
+++ b/src/codegen/c.zig
@@ -5196,13 +5196,7 @@ fn bitcast(f: *Function, dest_ty: Type, operand: CValue, operand_ty: Type) !CVal
const operand_lval = if (operand == .constant) blk: {
const operand_local = try f.allocLocal(null, operand_ty);
try f.writeCValue(w, operand_local, .Other);
- if (operand_ty.isAbiInt(zcu)) {
- try w.writeAll(" = ");
- } else {
- try w.writeAll(" = (");
- try f.renderType(w, operand_ty);
- try w.writeByte(')');
- }
+ try w.writeAll(" = ");
try f.writeCValue(w, operand, .Other);
try w.writeByte(';');
try f.object.newline();