-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
@memcpy: Don't check for aliasing if the type being copied has a bitSize of in 0 #21658
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
@memcpy: Don't check for aliasing if the type being copied has a bitSize of in 0 #21658
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure if this is an issue that needs fixing. @memcpy
ing requires memory to be involved, and ZSTs do not have any memory representation neither comptime nor runtime. Just my 2c.
The issue is #21655 , where correct code for a generic data structure in status-quo would need special-casing. |
Gotcha thanks, didn't see that. |
Seem CI is still failing, maybe not emitting anything in the case of zero bit types will fix it? |
This way of implementing it feels a little bit sketchy, maybe it should just be an early return? |
i seem to have messed something up in git |
f5eb38e
to
595c146
Compare
This isn't quite safe due to some edge cases with comptime-only types. I'm going to wait until myself and @alexrp finish our discussion with Andrew on |
Oops, I forgot to implement this into #22631. I'll look into this shortly. |
Superseded by #22708. |
Should close #21655
Unable to verify myself due to issues with building zig locally