mirror of
https://github.com/ziglang/zig.git
synced 2024-12-16 08:10:14 +00:00
fix broken cli test and translate-c: support no-op cast
This commit is contained in:
parent
0a495aa563
commit
2928b01afc
@ -1700,8 +1700,7 @@ static AstNode *trans_implicit_cast_expr(Context *c, TransScope *scope, const Im
|
||||
emit_warning(c, stmt->getBeginLoc(), "TODO handle C translation cast CK_LValueBitCast");
|
||||
return nullptr;
|
||||
case CK_NoOp:
|
||||
emit_warning(c, stmt->getBeginLoc(), "TODO handle C translation cast CK_NoOp");
|
||||
return nullptr;
|
||||
return trans_expr(c, ResultUsedYes, scope, stmt->getSubExpr(), TransRValue);
|
||||
case CK_BaseToDerived:
|
||||
emit_warning(c, stmt->getBeginLoc(), "TODO handle C translation cast CK_BaseToDerived");
|
||||
return nullptr;
|
||||
|
@ -127,5 +127,6 @@ fn testGodboltApi(zig_exe: []const u8, dir_path: []const u8) error!void {
|
||||
|
||||
const out_asm = try std.io.readFileAlloc(a, example_s_path);
|
||||
assertOrPanic(std.mem.indexOf(u8, out_asm, "square:") != null);
|
||||
assertOrPanic(std.mem.indexOf(u8, out_asm, "imul\tedi, edi") != null);
|
||||
assertOrPanic(std.mem.indexOf(u8, out_asm, "mov\teax, edi") != null);
|
||||
assertOrPanic(std.mem.indexOf(u8, out_asm, "imul\teax, edi") != null);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user