-
Notifications
You must be signed in to change notification settings - Fork 746
Incomplete array generated wrong layout #455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
flier
added a commit
to flier/rust-bindgen
that referenced
this issue
Jan 28, 2017
bors-servo
pushed a commit
that referenced
this issue
Jan 29, 2017
treat incomplete array as zero length array fix issue #455
This is fixed now. I'm landing tests for its use in statics here: #457 |
Thanks again for fixing this :) |
ian-h-chamberlain
added a commit
to ian-h-chamberlain/console_3ds
that referenced
this issue
Apr 16, 2022
This should actually be treated as a pointer (zero-sized array in Rust), rather than a true Rust array. rust-lang/rust-bindgen#455
ian-h-chamberlain
added a commit
to ian-h-chamberlain/console_3ds
that referenced
this issue
Apr 16, 2022
This should actually be treated as a pointer (zero-sized array in Rust), rather than a true Rust array. rust-lang/rust-bindgen#455 Also adjust regex to remove more unused vars
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As you know, GNU C and C++ supports Arrays of Length Zero in different syntax. For
int A[]
, LLVM has a IncompleteArrayType where the size is unspecified.For example, we have two array in a class
The incomplete array will be generated as a pointer, which cause the layout test failed
We should treat the incomplete array as a zero length array, or add a helper class like
__BindgenUnionField<T>
did.The text was updated successfully, but these errors were encountered: