6 ms·
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?
by stilley2 4mo ago
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?
- saagarjha 4mo agoThis is a non-standard extension, so your compiler may provide stronger guarantees.
- AlotOfReading 4mo agoIn practice, both GCC and Clang consider pointers to these unaligned members to be UB and will flag them in UBSAN.