Skip to content

Support bitfields in translate-c #4001

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

Closed
daurnimator opened this issue Dec 30, 2019 · 1 comment
Closed

Support bitfields in translate-c #4001

daurnimator opened this issue Dec 30, 2019 · 1 comment
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase. frontend Tokenization, parsing, AstGen, Sema, and Liveness. translate-c C to Zig source translation feature (@cImport)
Milestone

Comments

@daurnimator
Copy link
Contributor

Trying to use a @cImport-ed linux kernel header I got:

error: opaque types have unknown size and therefore cannot be directly embedded in structs
    kobj: struct_kobject,
          ^

Looking at the generated cimport.zig I found:

warning: struct demoted to opaque type - has bitfield

This issue tracks the implementation of bitfields in translate-c.

@daurnimator daurnimator added the translate-c C to Zig source translation feature (@cImport) label Dec 30, 2019
@andrewrk andrewrk added this to the 0.6.0 milestone Dec 31, 2019
@andrewrk andrewrk added enhancement Solving this issue will likely involve adding new logic or components to the codebase. frontend Tokenization, parsing, AstGen, Sema, and Liveness. labels Dec 31, 2019
@andrewrk
Copy link
Member

Duplicate of #1499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase. frontend Tokenization, parsing, AstGen, Sema, and Liveness. translate-c C to Zig source translation feature (@cImport)
Projects
Archived in project
Development

No branches or pull requests

2 participants