Skip to content

translate_c fails on flexible arrays in structs #4775

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
ifreund opened this issue Mar 22, 2020 · 1 comment
Closed

translate_c fails on flexible arrays in structs #4775

ifreund opened this issue Mar 22, 2020 · 1 comment
Labels
translate-c C to Zig source translation feature (@cImport)
Milestone

Comments

@ifreund
Copy link
Member

ifreund commented Mar 22, 2020

The following code fails to translate due to the flexible array in the struct.

struct wlr_drm_format {
	uint32_t format;
	size_t len, cap;
	uint64_t modifiers[];
};

This was discovered when trying to @cImport() headers from wlroots, code snippet taken from here

@andrewrk andrewrk added translate-c C to Zig source translation feature (@cImport) frontend Tokenization, parsing, AstGen, Sema, and Liveness. and removed frontend Tokenization, parsing, AstGen, Sema, and Liveness. labels Mar 28, 2020
@andrewrk andrewrk added this to the 0.7.0 milestone Mar 28, 2020
@andrewrk andrewrk modified the milestones: 0.7.0, 0.8.0 Aug 13, 2020
@ifreund
Copy link
Member Author

ifreund commented May 16, 2021

Closing as duplicate of #8759

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
translate-c C to Zig source translation feature (@cImport)
Projects
None yet
Development

No branches or pull requests

2 participants