Skip to content

Explicitly prohibit bitfields or generate glue code for them #393

@keynmol

Description

@keynmol

One aspect of C I completely forgot about is bitfields, e.g.

struct Flags {
    unsigned int a : 1;
    unsigned int b : 5;
    unsigned int c : 13;
};

The layout is not guaranteed, accessing it is weird, size is not defined..

I think we should outright reject them, because layout is compiler specific we cannot expose this in bindings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions