Using bitfield-structs in binary de-serialization: is layout guaranteed on GCC?

Advertisements So, I’m writing a struct that’s going to be used for de-serializing a binary stream of data. To get the point across, here is a cut-down version: typedef struct { bool flag1 : 1; bool flag2 : 1; bool flag3 : 1; bool flag4 : 1; uint32_t reserved : 28; } frame_flags_t; typedef struct… Read More Using bitfield-structs in binary de-serialization: is layout guaranteed on GCC?