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

Casting union fields to union type #279

Open
DrDeano opened this issue Jan 2, 2021 · 1 comment
Open

Casting union fields to union type #279

DrDeano opened this issue Jan 2, 2021 · 1 comment
Labels
arch: none Affects common code across architectures blocked Blocked on an external issue bug Something isn't working as it should

Comments

@DrDeano
Copy link
Member

DrDeano commented Jan 2, 2021

In VFS, we need to cast a element of the union Node to the Node type. This is currently done using @ptrCast but will have undefined behavior if the memory layout is not as expected.
What we need is @fieldParentPtr, but is not implemented yet: ziglang/zig#6611

@DrDeano DrDeano added bug Something isn't working as it should arch: none Affects common code across architectures blocked Blocked on an external issue labels Jan 2, 2021
@mnemnion
Copy link

mnemnion commented Dec 8, 2024

Just a note that this is fixed on master with #14689

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch: none Affects common code across architectures blocked Blocked on an external issue bug Something isn't working as it should
Projects
None yet
Development

No branches or pull requests

2 participants