authorgravatar for reserveblue@protonmail.comdrew <reserveblue@protonmail.com> 2021-11-14 18:31:31-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-11-16 16:51:31-07:00
log34684725aa728e392368a5743e1a2405328d5788
treeb1315a5017114fa4d2475f43c423bdc1f7adfd42
parent9bf1681990fe87a6b2e5fc644a89f1aece304579

fmt


2 files changed, 4 insertions(+), 4 deletions(-)

src/codegen/c.zig+3-3
......@@ -248,10 +248,10 @@ pub const DeclGen = struct {
248248 if (is_neg) try writer.writeByte('-');
249249
250250 assert(high > 0);
251 try writer.print("(((uint128_t)0x{x}u<<64)", .{ high });
251 try writer.print("(((uint128_t)0x{x}u<<64)", .{high});
252252
253253 if (low > 0)
254 try writer.print("+(uint128_t)0x{x}u", .{ low });
254 try writer.print("+(uint128_t)0x{x}u", .{low});
255255
256256 return writer.writeByte(')');
257257 }
......@@ -306,7 +306,7 @@ pub const DeclGen = struct {
306306 if (ty.isSignedInt())
307307 return writer.print("{d}", .{val.toSignedInt()});
308308 return writer.print("{d}u", .{val.toUnsignedInt()});
309 }
309 },
310310 },
311311 .Float => {
312312 if (ty.floatBits(dg.module.getTarget()) <= 64) {
test/behavior/int128.zig+1-1
......@@ -40,4 +40,4 @@ test "int128" {
4040test "truncate int128" {
4141 var buff: u128 = maxInt(u128);
4242 try expect(@truncate(u64, buff) == maxInt(u64));
43}
\ No newline at end of file
43}