mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 00:35:10 +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
@ -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…
x
Reference in New Issue
Block a user