Skip to content
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

zig translate-c outputs @OpaqueType() for C structs with bitfields #3835

Closed
qbradley opened this issue Dec 3, 2019 · 1 comment
Closed
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. frontend Tokenization, parsing, AstGen, Sema, and Liveness. translate-c C to Zig source translation feature (@cImport)
Milestone

Comments

@qbradley
Copy link
Contributor

qbradley commented Dec 3, 2019

Create file repro.h with contents:

struct Repro {     
    unsigned flag :1;
};

Run zig translate-c repro.h

Unexpected output:

pub const struct_Repro = @OpaqueType();
@daurnimator daurnimator added the translate-c C to Zig source translation feature (@cImport) label Dec 3, 2019
@andrewrk andrewrk added this to the 0.7.0 milestone Dec 3, 2019
@andrewrk andrewrk added contributor friendly This issue is limited in scope and/or knowledge of Zig internals. frontend Tokenization, parsing, AstGen, Sema, and Liveness. labels Jan 2, 2020
@daurnimator
Copy link
Contributor

Duplicate of #1499, #4001

@andrewrk andrewrk modified the milestones: 0.7.0, 0.6.0 Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. frontend Tokenization, parsing, AstGen, Sema, and Liveness. translate-c C to Zig source translation feature (@cImport)
Projects
None yet
Development

No branches or pull requests

3 participants