You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue was labelled with: in the Rust repository
In a lot of FFI code, I see patterns like:
struct X {}
fn some_c_function(this: *mut X);
where X is used as an opaque "black-box" object. With rust today, X needs a #[repr(C)]. That's not really necessary, and caused a bunch of noisy warnings when updating servo's rust version.
Can someone mark this bug as easy so a beginner can use it to get started?
The text was updated successfully, but these errors were encountered:
Empty structs do not exist in C, and it is not clear what their representation should be.
In C with GCC extensions, sizeof(empty_struct) == 0. But in C++, sizeof(empty_struct) == 1.
For the case of incomplete types in C headers, something like RFC #709 unsized types would be a better fit.
Issue by cgaebel
Thursday Nov 06, 2014 at 07:50 GMT
For earlier discussion, see rust-lang/rust#18686
This issue was labelled with: in the Rust repository
In a lot of FFI code, I see patterns like:
where
X
is used as an opaque "black-box" object. With rust today,X
needs a#[repr(C)]
. That's not really necessary, and caused a bunch of noisy warnings when updating servo's rust version.Can someone mark this bug as easy so a beginner can use it to get started?
The text was updated successfully, but these errors were encountered: