@VladD, Эта проблема strict-aliasing и ее ноги растут из оптимизации. Реально, не столь страшен черт, как его малюют.
Лучше всего внимательно прочесть в https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/Optimize-Options.html#Optimize-Options , перейдя к строкам после -fstrict-aliasing. Далее перейти к https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/Structures-unions-enumerations-and-bit-fields-implementation.html#Structures-unions-enumerations-and-bit-fields-implementation
Основное там: integer types, such as long int, and enumerated types are permitted even in strictly conforming mode.