• 8bit enums
    Hello everyone, I'm using some enums and due to the standard they are 16bit int per default. But in most of my cases 8bit would be sufficient and I'm not loaded with free RAM. I found that the compiler...
  • Enums and Ints
    Bug, or just weird subtlety of ANSI C when it comes to enums and ints? typedef enum { es16_1, es16_2, es16_3, es16_Force16 = 0x7fff } EnumS16; typedef enum { eu16_1, eu16_2, eu16_3, eu16_Force16...
  • Length of a typedef enum
    I am trying to pass the length of a typedefinition to an integer by using the sizeof function. At the moment I only get the value 4 passed back no matter the number of items are in the typedef. This...
  • Wrong sign of enum
    I have a simple code like this: typedef enum { N1 = 1, N2 = 2 } EnumType; int main(void) { EnumType A = N1; if( A >= 0 ) return 1; return 0; } Comparison with zero gives me warning...
  • enum values out of range!
    In the uVision enviroment i have a warning which according to the help files i do not believe i should get. It complains about the typedef enum { DATAACCESS_Config = (u32)0x00000000, DATAACCESS_Status...