News for hackers. Stuff that matters.
Re:The Lost Art of Structure Packing (2018) by nly on Monday April 27, 2020 @07:47PM (#23001618)
This doesn't help you, because the contents of the padding bytes is not guaranteed to be anything in particular. Two structs containing identical field values can have different padding bytes. Reading the padding bytes is UB.

Just pack the struct and be done with it.

There are no comments on this comment yet.