Quantcast
Viewing all articles
Browse latest Browse all 22037

How to set the size of enums to 32 bits with arm-gcc without using -fno-short-enums

I need to fix the size of enums in arm-gcc 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?


Viewing all articles
Browse latest Browse all 22037

Trending Articles