mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
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:
parent
029cc0640f
commit
81277b5487
1 changed files with 0 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue