implement defining C variadic functions

This commit is contained in:
Veikka Tuominen
2022-12-13 00:14:54 +02:00
parent 728dd29f1a
commit 9bb1104e37
21 changed files with 598 additions and 12 deletions

View File

@@ -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