I want to define an enum with sizeof()==1 in C without using any command line options that apply to all enums. Something like:
typedef enum { MINVAL=-128, MAXVAL=127 } E8_t;
I’d like to apply an attribute to it that would tell the compiler to make it’s size 8 bits. Is this already possible in Clang? I tried attribute((packed)) but get an error.
Thanks