2018-08-19 13:30:23 +00:00
|
|
|
//@ ignore-arm stdcall isn't supported
|
2022-08-08 13:31:32 +00:00
|
|
|
#![feature(extended_varargs_abi_support)]
|
2017-05-26 16:54:56 +00:00
|
|
|
|
|
|
|
fn baz(f: extern "stdcall" fn(usize, ...)) {
|
2022-08-08 13:31:32 +00:00
|
|
|
//~^ ERROR: C-variadic function must have a compatible calling convention,
|
2024-01-13 07:05:07 +00:00
|
|
|
// like C, cdecl, system, aapcs, win64, sysv64 or efiapi
|
2022-08-08 13:31:32 +00:00
|
|
|
f(22, 44);
|
|
|
|
}
|
|
|
|
|
2024-01-13 07:05:07 +00:00
|
|
|
fn system(f: extern "system" fn(usize, ...)) {
|
|
|
|
f(22, 44);
|
|
|
|
}
|
2023-09-14 21:21:39 +00:00
|
|
|
fn aapcs(f: extern "aapcs" fn(usize, ...)) {
|
|
|
|
f(22, 44);
|
|
|
|
}
|
2022-08-08 13:31:32 +00:00
|
|
|
fn sysv(f: extern "sysv64" fn(usize, ...)) {
|
|
|
|
f(22, 44);
|
|
|
|
}
|
|
|
|
fn win(f: extern "win64" fn(usize, ...)) {
|
|
|
|
f(22, 44);
|
|
|
|
}
|
|
|
|
fn efiapi(f: extern "efiapi" fn(usize, ...)) {
|
2013-11-04 21:34:07 +00:00
|
|
|
f(22, 44);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|