Skip to content

Commit 81277b5

Browse files
committed
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.
1 parent 029cc06 commit 81277b5

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/codegen/c.zig

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4980,11 +4980,6 @@ fn bitcast(f: *Function, dest_ty: Type, operand: CValue, operand_ty: Type) !CVal
49804980
const operand_local = try f.allocLocal(null, operand_ty);
49814981
try f.writeCValue(writer, operand_local, .Other);
49824982
try writer.writeAll(" = ");
4983-
if (!operand_ty.isAbiInt(zcu)) {
4984-
try writer.writeByte('(');
4985-
try f.renderType(writer, operand_ty);
4986-
try writer.writeByte(')');
4987-
}
49884983
try f.writeCValue(writer, operand, .Other);
49894984
try writer.writeAll(";\n");
49904985
break :blk operand_local;

0 commit comments

Comments
 (0)