I need to fix the size of enums in arm-gcc (plain C, standard 99, not C++) to 32 bits. I don't want to use -fno-short-enums because it generates a warning because of other libraries I'm linking against.
I have tried __attribute__((packed)) and #pragma pack(4) and none of them work.
Is there any way to achieve this, apart from adding a enum constant like __MAKE_4_BYTES = 0xFFFFFFFF?
User contributions licensed under CC BY-SA 3.0