3 ms·
Zig has defer and errdefer. C should just steal however Zig does it.
by earthboundkid 6y ago
Zig has defer and errdefer. C should just steal however Zig does it.
- 0xTJ 6y agoI love Zig, and I'm looking forward to it continuing to mature. I've been waiting for a specific compiler TODO to be resolved (something like initializing union bitfields) that (at least as of 0.7.0) wasn't yet implemented, because I was using it in a toy OS for some GDT stuff.
- dnautics 6y agoHad some difficulty with toy os gdt too! I think what you are looking for is the packed union bug. I would suggest doing it "the hard way", one thought would be treating it as an array (comptime known length) of u8