| 1 | extern fn printf([*:0]const u8, ...) c_int; |
| 2 | |
| 3 | pub export fn entry() void { |
| 4 | _ = printf("%d %d %d %d\n", 1, 2, 3, 4); |
| 5 | } |
| 6 | |
| 7 | pub export fn entry1() void { |
| 8 | var arr: [2]u8 = undefined; |
| 9 | _ = printf("%d\n", arr); |
| 10 | _ = &arr; |
| 11 | } |
| 12 | |
| 13 | pub export fn entry2() void { |
| 14 | _ = printf("%d\n", @as(u48, 2)); |
| 15 | } |
| 16 | |
| 17 | pub export fn entry3() void { |
| 18 | _ = printf("%d\n", {}); |
| 19 | } |
| 20 | |
| 21 | // error |
| 22 | // |
| 23 | // :4:33: error: integer and float literals passed to variadic function must be casted to a fixed-size number type |
| 24 | // :9:24: error: arrays must be passed by reference to variadic function |
| 25 | // :14:24: error: cannot pass 'u48' to variadic function |
| 26 | // :14:24: note: only integers with 0 or power of two bits are extern compatible |
| 27 | // :18:24: error: cannot pass 'void' to variadic function |
| 28 | // :18:24: note: 'void' is a zero bit type |