Re:A bug story: data alignment on x86
by Thiez on Monday November 07, 2016 @01:49PM
(#12893699)
Well given that Rust leaves struct layout undefined unless #[repr(C)] is specified, std::mem::size_of::<Three> is actually not guaranteed to be 4.
[ Parent
| on HN ]
Re:A bug story: data alignment on x86
by steveklabnik on Monday November 07, 2016 @02:01PM
(#12893824)
While this is true, it's a weird angle that's not itself super well defined. That is, the definition of repr(packed) implies that the alignment will always be there without it...