zig icon indicating copy to clipboard operation
zig copied to clipboard

@memcpy: Don't check for aliasing if the type being copied has a bitSize of in 0

Open JonathanHallstrom opened this issue 1 year ago • 4 comments

Should close https://github.com/ziglang/zig/issues/21655 Unable to verify myself due to issues with building zig locally

JonathanHallstrom avatar Oct 10 '24 17:10 JonathanHallstrom

I'm unsure if this is an issue that needs fixing.

The issue is https://github.com/ziglang/zig/issues/21655 , where correct code for a generic data structure in status-quo would need special-casing. Discussion might make more sense there; I think it makes perfect sense to instead special-case the compiler builtin though.

rohlem avatar Oct 10 '24 22:10 rohlem

I'm unsure if this is an issue that needs fixing.

The issue is #21655 , where correct code for a generic data structure in status-quo would need special casing. Discussion might make more sense there; I think it makes perfect sense to instead special-case the compiler builtin though.

Gotcha thanks, didn't see that.

Rexicon226 avatar Oct 10 '24 22:10 Rexicon226

Seem CI is still failing, maybe not emitting anything in the case of zero bit types will fix it?

JonathanHallstrom avatar Oct 11 '24 09:10 JonathanHallstrom

This way of implementing it feels a little bit sketchy, maybe it should just be an early return?

JonathanHallstrom avatar Oct 11 '24 09:10 JonathanHallstrom

i seem to have messed something up in git

JonathanHallstrom avatar Nov 01 '24 15:11 JonathanHallstrom

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 @memcpy semantics before proposing a path forward here -- hold tight.

mlugg avatar Jan 26 '25 18:01 mlugg

@mlugg this was superseded by #22631, right?

alexrp avatar Jan 29 '25 08:01 alexrp

Oops, I forgot to implement this into #22631. I'll look into this shortly.

mlugg avatar Jan 29 '25 09:01 mlugg

Superseded by #22708.

mlugg avatar Feb 01 '25 09:02 mlugg