zig/test/cases/compile_errors/invalid_variadic_function.zig
Alex Rønne Petersen beb507a1ed
std.builtin: add CallingConvention.x86_64_x32
This was forgotten during the refactoring of std.builtin.CallingConvention. It
mirrors mips64_n32 for MIPS.
2025-10-23 09:27:17 +02:00

18 lines
472 B
Zig

fn foo(...) void {}
inline fn foo2(...) void {}
comptime {
_ = foo;
}
comptime {
_ = foo2;
}
// error
// target=x86_64-linux
//
// :1:8: error: variadic function does not support 'auto' calling convention
// :1:8: note: supported calling conventions: 'x86_64_sysv', 'x86_64_x32', 'x86_64_win'
// :2:16: error: variadic function does not support 'inline' calling convention
// :2:16: note: supported calling conventions: 'x86_64_sysv', 'x86_64_x32', 'x86_64_win'