Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
stilley2
· 6mo ago · 0 comments
Does that mean that if I have a struct with #pragma pack(push, 1) I can't use pointers to any members that don't happen to be aligned?
Comments
[–]
saagarjha
6mo ago
This is a non-standard extension, so your compiler may provide stronger guarantees.
[–]
AlotOfReading
6mo ago
In practice, both GCC and Clang consider pointers to these unaligned members to be UB and will flag them in UBSAN.