Skip to content

Structs which are both packed and aligned fail to compile #75

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
TheDan64 opened this issue Apr 19, 2019 · 1 comment
Closed

Structs which are both packed and aligned fail to compile #75

TheDan64 opened this issue Apr 19, 2019 · 1 comment
Labels
blocked Cannot be supported without external support first bug Something isn't working

Comments

@TheDan64
Copy link
Contributor

For example, the linux headers have this struct:

struct xregs_state {
    struct fxregs_state i387;
    struct xstate_header header;
    u8 extended_state_area[0];
} __attribute__ ((packed, aligned(64)));

Which will fail to compile when translated due to being #[repr(C, packed, align(64)] but a struct cannot be packed and aligned in rust. This is blocked on rust-lang/rust#59154

@TheDan64 TheDan64 added bug Something isn't working blocked Cannot be supported without external support first labels Apr 19, 2019
@ahomescu
Copy link
Contributor

ahomescu commented Aug 5, 2019

Fixed in 49d2b57.

@ahomescu ahomescu closed this as completed Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Cannot be supported without external support first bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants