#pragma pack(push, 1)
typedef enum __attribute__ ((__packed__)) {
ETypeZero = 0,
ETypeOne,
ETypeTwo,
ETypeUndefined
} ESomeType;
#pragma pack(pop)
In my code above, I had accidentally forgot #pragma pack(pop)
, and I saw some other data down the line getting corrupted. Why would that have occurred?
Also, is there a GCC flag that can detect the missing pop?