Skip to content

Bindgen fail to generate bindings for struct. #1314

Open
@Catramen

Description

Header:
#include <stdint.h>
typedef struct {
uint32_t f : 20;
uint8_t f1 : 4;
uint8_t f2 : 1;
uint8_t f3 : 1;
uint8_t f4 : 1;
uint8_t f5 : 5;
uint16_t f6;
uint8_t f7;
uint8_t f8;
uint8_t f9;
uint8_t f10;
uint8_t f11 : 2;
uint8_t f12 : 4;
uint16_t f13 : 10;
uint8_t f14;
uint32_t f15 : 19;
} S;

Bindgen command:
bindgen types.h -o t.rs
ERROR 2018-05-17T23:24:11Z: bindgen::codegen::struct_layout: Calculated wrong layout for S, too more 1 bytes

Bindgen version:
bindgen 0.36.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions