From 81277b5487e53d3e96351c2f1b14f437321210cc Mon Sep 17 00:00:00 2001 From: mlugg Date: Mon, 28 Apr 2025 02:38:07 +0100 Subject: [PATCH] cbe: aggregate assignment does not need a second cast `writeCValue` already emits a cast; including another here is, in fact, invalid, and emits errors under MSVC. Probably this code was originally added to work around the incorrect `.Initializer` location which was fixed in the previous commit. --- src/codegen/c.zig | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 84c16db3d0..b4ac25655c 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -4980,11 +4980,6 @@ fn bitcast(f: *Function, dest_ty: Type, operand: CValue, operand_ty: Type) !CVal const operand_local = try f.allocLocal(null, operand_ty); try f.writeCValue(writer, operand_local, .Other); try writer.writeAll(" = "); - if (!operand_ty.isAbiInt(zcu)) { - try writer.writeByte('('); - try f.renderType(writer, operand_ty); - try writer.writeByte(')'); - } try f.writeCValue(writer, operand, .Other); try writer.writeAll(";\n"); break :blk operand_local;