mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-28 03:17:08 +03:00
implement defining C variadic functions
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
fn foo(...) void {}
|
||||
fn bar(a: anytype, ...) callconv(a) void {}
|
||||
|
||||
comptime { _ = foo; }
|
||||
comptime { _ = bar; }
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :1:1: error: variadic function must have 'C' calling convention
|
||||
// :2:1: error: generic function cannot be variadic
|
||||
Reference in New Issue
Block a user