Skip to content

Commit

Permalink
Merge pull request ziglang#16339 from r00ster91/ueficc
Browse files Browse the repository at this point in the history
std.os.uefi: use std.os.uefi.cc instead of .C as calling convention
  • Loading branch information
andrewrk authored Jul 10, 2023
2 parents 93c1999 + 23df11c commit 6f3b216
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion compile_errors/invalid_variadic_function.zig
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
fn foo(...) void {}
fn bar(a: anytype, ...) callconv(a) void {}
inline fn foo2(...) void {}

comptime {
_ = foo;
}
comptime {
_ = bar;
}
comptime {
_ = foo2;
}

// error
// backend=stage2
// target=native
//
// :1:1: error: variadic function must have 'C' calling convention
// :1:1: error: variadic function does not support '.Unspecified' calling convention
// :1:1: note: supported calling conventions: '.C'
// :2:1: error: generic function cannot be variadic
// :1:1: error: variadic function does not support '.Inline' calling convention
// :1:1: note: supported calling conventions: '.C'
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ comptime {
// backend=stage2
// target=native
//
// :1:13: error: varargs functions must have C calling convention
// :1:13: error: variadic function does not support '.Unspecified' calling convention
// :1:13: note: supported calling conventions: '.C'

0 comments on commit 6f3b216

Please sign in to comment.