rust-bindgen: Incorrect layout with large bitfield
Follow up to https://github.com/rust-lang-nursery/rust-bindgen/pull/1001
Input C/C++ Header
struct {
unsigned : 632;
} a;
Bindgen Invocation
$ bindgen input.h
Actual Results
Panic when running the layout tests: our generated struct ends up with the wrong size.
Expected Results
We generate a struct with the correct layout, and it passes its layout tests.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (17 by maintainers)
Commits related to this issue
- Auto merge of #1059 - aeleos:master, r=fitzgen Remove early anonymous bitfield filtering and consolidate name method This PR is some changes to early bitfield filtering to help fix (#1007) This does... — committed to rust-lang/rust-bindgen by deleted user 7 years ago
- Auto merge of #1060 - aeleos:master, r=fitzgen Make bitfields larger than type opaque @fitzgen r? Fixes #1007 by ensuring that bitfields larger than type will be opaque, ensuring the layout is corr... — committed to rust-lang/rust-bindgen by deleted user 7 years ago
Looks like
g++agrees withclang++on a size of80: