summaryrefslogtreecommitdiffstats
path: root/src/test/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs
blob: 087743e505d25362f06c04b61e5d87cf4e1c14bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![feature(abi_efiapi)]

fn efiapi(f: extern "efiapi" fn(usize, ...)) {
    //~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
    //~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
    f(22, 44);
}
fn sysv(f: extern "sysv64" fn(usize, ...)) {
    //~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
    //~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
    f(22, 44);
}
fn win(f: extern "win64" fn(usize, ...)) {
    //~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
    //~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
    f(22, 44);
}

fn main() {}