Hacker News new | ask | show | jobs
by 10000truths 1779 days ago
For architectures where unaligned accesses are illegal, gcc will generate multiple load/store instructions when accessing packed struct fields by name. The main caveat to look out for is taking the address of a packed struct member and then dereferencing it.
1 comments

Ah, right. Thanks for the correction.