error: "va_start" used in Win64 ABI funtion getting thi seero in clang help me to solve this?
error: "va_start" used in Win64 ABI funtion getting thi seero in clang help me to solve this?
我已经编译了,但是在 ubuntu 中使用 CLANG 进行编译时,我遇到了这样的错误:"va_start" 在 Win64 ABI 函数中使用。谁能帮帮我?
因为你的函数是 static
和 我怀疑你将它作为参数传递到任何地方,我相信你可以在这里删除 EFIABI
(并在声明中)。 EFIABI
是一个 4 寄存器调用约定,GCC 似乎不支持可变参数。
根据 here. Use the builtins if you want to "cross-compile" between linux and windows targets, per here, also add __attribute__((ms_abi))
, otherwise it will not work either, see these tests.,va_*
被 clang 明确禁止
static int
__attribute__((ms_abi))
va_Utimes(
const char *path,
...
)
{
__builtin_ms_va_list ap;
__builtin_ms_va_start(ap, path);
retval = ...ioctl( filp, FIOSETIME, ap);
__builtin_ms_va_end(ap);
return retval;
}
我已经编译了,但是在 ubuntu 中使用 CLANG 进行编译时,我遇到了这样的错误:"va_start" 在 Win64 ABI 函数中使用。谁能帮帮我?
因为你的函数是 static
和 我怀疑你将它作为参数传递到任何地方,我相信你可以在这里删除 EFIABI
(并在声明中)。 EFIABI
是一个 4 寄存器调用约定,GCC 似乎不支持可变参数。
__attribute__((ms_abi))
, otherwise it will not work either, see these tests.,va_*
被 clang 明确禁止
static int
__attribute__((ms_abi))
va_Utimes(
const char *path,
...
)
{
__builtin_ms_va_list ap;
__builtin_ms_va_start(ap, path);
retval = ...ioctl( filp, FIOSETIME, ap);
__builtin_ms_va_end(ap);
return retval;
}