cl-bindgen icon indicating copy to clipboard operation
cl-bindgen copied to clipboard

Nested anonymous records cause cl-bindgen to crash

Open sdilts opened this issue 6 years ago • 0 comments

Structs like

struct foo {
    enum type flag;
    union {
        int a;
        double b;
    };
};

Cause an assertion error originating here: https://github.com/sdilts/cl-bindgen/blob/920df4cfa5e72c17c3722eda262a0936c9789b11/cl_bindgen/processfile.py#L210-L213

Here's what the C spec says on nested unions: https://en.cppreference.com/w/c/language/union

sdilts avatar Mar 20 '20 16:03 sdilts