Open iiian opened 8 months ago
Furthermore, I'd like to suggest that the examples could do with perhaps either some comments or maybe diagrams of extra allocated memory or word/half-word partitioning (or whatever the best technical terms are)
And finally, I'm not following why with
const b1: u64 align(1) = 100;
const b2 align(1) = @as(u64, 100);
b1
needs the :
but b2
doesn't 😵
First and foremost, I appreciate you taking the time to make zig.guide, so thank you for being a maintainer.
Caveat: I could be completely wrong here, I'm just going from what I understand, and there's a good chance you know more than me, but I thought I'd mention anyway in case you agree.
Issue
https://zig.guide/working-with-c/alignment
The page here reads:
[2] seems (to perhaps only me) to be contradictory to [1]: [2] seems to imply to me that an
f32
can be stored at a memory address that is byte or even half-word aligned, in direct violation of what [1] is saying(?). I may be rusty on my CPU arch, but that's the wrong interpretation of what you wish to convey, right?