| ... | @@ -2428,7 +2428,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void { | ... | @@ -2428,7 +2428,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 2428 | \\ b: c_int, | 2428 | \\ b: c_int, |
| 2429 | \\}; | 2429 | \\}; |
| 2430 | \\pub extern var a: struct_Foo; | 2430 | \\pub extern var a: struct_Foo; |
| 2431 | \\pub export var b: f32 = 2; | 2431 | \\pub export var b: f32 = 2.0; |
| 2432 | \\pub export fn foo() void { | 2432 | \\pub export fn foo() void { |
| 2433 | \\ var c: [*c]struct_Foo = undefined; | 2433 | \\ var c: [*c]struct_Foo = undefined; |
| 2434 | \\ _ = a.b; | 2434 | \\ _ = a.b; |
| ... | @@ -2992,17 +2992,17 @@ pub fn addCases(cases: *tests.TranslateCContext) void { | ... | @@ -2992,17 +2992,17 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 2992 | \\pub extern fn fn_bool(x: bool) void; | 2992 | \\pub extern fn fn_bool(x: bool) void; |
| 2993 | \\pub extern fn fn_ptr(x: ?*c_void) void; | 2993 | \\pub extern fn fn_ptr(x: ?*c_void) void; |
| 2994 | \\pub export fn call() void { | 2994 | \\pub export fn call() void { |
| 2995 | \\ fn_int(@floatToInt(c_int, 3)); | 2995 | \\ fn_int(@floatToInt(c_int, 3.0)); |
| 2996 | \\ fn_int(@floatToInt(c_int, 3)); | 2996 | \\ fn_int(@floatToInt(c_int, 3.0)); |
| 2997 | \\ fn_int(@floatToInt(c_int, 3)); | 2997 | \\ fn_int(@floatToInt(c_int, 3.0)); |
| 2998 | \\ fn_int(@as(c_int, 1094861636)); | 2998 | \\ fn_int(@as(c_int, 1094861636)); |
| 2999 | \\ fn_f32(@intToFloat(f32, @as(c_int, 3))); | 2999 | \\ fn_f32(@intToFloat(f32, @as(c_int, 3))); |
| 3000 | \\ fn_f64(@intToFloat(f64, @as(c_int, 3))); | 3000 | \\ fn_f64(@intToFloat(f64, @as(c_int, 3))); |
| 3001 | \\ fn_char(@bitCast(u8, @truncate(i8, @as(c_int, '3')))); | 3001 | \\ fn_char(@bitCast(u8, @truncate(i8, @as(c_int, '3')))); |
| 3002 | \\ fn_char(@bitCast(u8, @truncate(i8, @as(c_int, '\x01')))); | 3002 | \\ fn_char(@bitCast(u8, @truncate(i8, @as(c_int, '\x01')))); |
| 3003 | \\ fn_char(@bitCast(u8, @truncate(i8, @as(c_int, 0)))); | 3003 | \\ fn_char(@bitCast(u8, @truncate(i8, @as(c_int, 0)))); |
| 3004 | \\ fn_f32(3); | 3004 | \\ fn_f32(3.0); |
| 3005 | \\ fn_f64(3); | 3005 | \\ fn_f64(3.0); |
| 3006 | \\ fn_bool(@as(c_int, 123) != 0); | 3006 | \\ fn_bool(@as(c_int, 123) != 0); |
| 3007 | \\ fn_bool(@as(c_int, 0) != 0); | 3007 | \\ fn_bool(@as(c_int, 0) != 0); |
| 3008 | \\ fn_bool(@ptrToInt(fn_int) != 0); | 3008 | \\ fn_bool(@ptrToInt(fn_int) != 0); |