Closed
Description
Summary
On x86_64, Aarch64, and PowerPC core::ffi::VaList
will not pass the improper_ctypes
lint, but it should.
Example
Given the following:
#![no_std]
#![feature(c_variadic)]
#![deny(improper_ctypes)]
use core::ffi::VaList;
extern "C" {
pub fn some_fn(_: i32, _: VaList);
}
The compiler will yield:
error: `extern` block uses type `()` which is not FFI-safe: tuples have unspecified layout
--> test.rs:7:31
|
7 | pub fn some_fn(_: i32, _: VaList);
| ^^^^^^
|
note: lint level defined here
--> test.rs:3:9
|
3 | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^
= help: consider using a struct instead
error: aborting due to previous error
Description
The implementation of VaListImpl
for the x86_64, Aarch64, and PowerPC architectures uses *mut ()
or *const ()
as the pointer type for the pointers to the architecture specific save areas (e.g., the x86_64 implementation).
Metadata
Metadata
Assignees
Labels
No labels