| ... | ... | @@ -814,7 +814,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 814 | 814 | \\} |
| 815 | 815 | , &[_][]const u8{ |
| 816 | 816 | \\pub export fn foo() c_int { |
| 817 | | \\ return (@as(c_int, 1) << @as(@import("std").math.Log2Int(c_int), 2)) >> @as(@import("std").math.Log2Int(c_int), 1); |
| 817 | \\ return (@as(c_int, 1) << @intCast(@import("std").math.Log2Int(c_int), 2)) >> @intCast(@import("std").math.Log2Int(c_int), 1); |
| 818 | 818 | \\} |
| 819 | 819 | }); |
| 820 | 820 | |
| ... | ... | @@ -1980,7 +1980,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 1980 | 1980 | \\ var a = arg_a; |
| 1981 | 1981 | \\ var i: c_int = 0; |
| 1982 | 1982 | \\ while (a > @bitCast(c_uint, @as(c_int, 0))) { |
| 1983 | | \\ a >>= @as(@import("std").math.Log2Int(c_int), 1); |
| 1983 | \\ a >>= @intCast(@import("std").math.Log2Int(c_int), 1); |
| 1984 | 1984 | \\ } |
| 1985 | 1985 | \\ return i; |
| 1986 | 1986 | \\} |
| ... | ... | @@ -2000,7 +2000,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 2000 | 2000 | \\ var a = arg_a; |
| 2001 | 2001 | \\ var i: c_int = 0; |
| 2002 | 2002 | \\ while (a > @bitCast(c_uint, @as(c_int, 0))) { |
| 2003 | | \\ a >>= @as(@import("std").math.Log2Int(c_int), 1); |
| 2003 | \\ a >>= @intCast(@import("std").math.Log2Int(c_int), 1); |
| 2004 | 2004 | \\ } |
| 2005 | 2005 | \\ return i; |
| 2006 | 2006 | \\} |
| ... | ... | @@ -2051,14 +2051,14 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 2051 | 2051 | \\ ref.* = ref.* ^ @as(c_int, 1); |
| 2052 | 2052 | \\ break :blk ref.*; |
| 2053 | 2053 | \\ }); |
| 2054 | | \\ a >>= @as(@import("std").math.Log2Int(c_int), (blk: { |
| 2054 | \\ a >>= @intCast(@import("std").math.Log2Int(c_int), (blk: { |
| 2055 | 2055 | \\ const ref = &a; |
| 2056 | | \\ ref.* = ref.* >> @as(@import("std").math.Log2Int(c_int), @as(c_int, 1)); |
| 2056 | \\ ref.* = ref.* >> @intCast(@import("std").math.Log2Int(c_int), @as(c_int, 1)); |
| 2057 | 2057 | \\ break :blk ref.*; |
| 2058 | 2058 | \\ })); |
| 2059 | | \\ a <<= @as(@import("std").math.Log2Int(c_int), (blk: { |
| 2059 | \\ a <<= @intCast(@import("std").math.Log2Int(c_int), (blk: { |
| 2060 | 2060 | \\ const ref = &a; |
| 2061 | | \\ ref.* = ref.* << @as(@import("std").math.Log2Int(c_int), @as(c_int, 1)); |
| 2061 | \\ ref.* = ref.* << @intCast(@import("std").math.Log2Int(c_int), @as(c_int, 1)); |
| 2062 | 2062 | \\ break :blk ref.*; |
| 2063 | 2063 | \\ })); |
| 2064 | 2064 | \\} |
| ... | ... | @@ -2109,14 +2109,14 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 2109 | 2109 | \\ ref.* = ref.* ^ @bitCast(c_uint, @as(c_int, 1)); |
| 2110 | 2110 | \\ break :blk ref.*; |
| 2111 | 2111 | \\ }); |
| 2112 | | \\ a >>= @as(@import("std").math.Log2Int(c_uint), (blk: { |
| 2112 | \\ a >>= @intCast(@import("std").math.Log2Int(c_uint), (blk: { |
| 2113 | 2113 | \\ const ref = &a; |
| 2114 | | \\ ref.* = ref.* >> @as(@import("std").math.Log2Int(c_int), @as(c_int, 1)); |
| 2114 | \\ ref.* = ref.* >> @intCast(@import("std").math.Log2Int(c_int), @as(c_int, 1)); |
| 2115 | 2115 | \\ break :blk ref.*; |
| 2116 | 2116 | \\ })); |
| 2117 | | \\ a <<= @as(@import("std").math.Log2Int(c_uint), (blk: { |
| 2117 | \\ a <<= @intCast(@import("std").math.Log2Int(c_uint), (blk: { |
| 2118 | 2118 | \\ const ref = &a; |
| 2119 | | \\ ref.* = ref.* << @as(@import("std").math.Log2Int(c_int), @as(c_int, 1)); |
| 2119 | \\ ref.* = ref.* << @intCast(@import("std").math.Log2Int(c_int), @as(c_int, 1)); |
| 2120 | 2120 | \\ break :blk ref.*; |
| 2121 | 2121 | \\ })); |
| 2122 | 2122 | \\} |