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.
This commit is contained in:
mlugg 2025-04-28 02:38:07 +01:00
parent 029cc0640f
commit 81277b5487
No known key found for this signature in database
GPG key ID: 3F5B7DCCBF4AF02E

View file

@ -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;