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 = 0xffff } EnumU16;
This is all speculation but I vote for your first hand. The C166 manual (I assume the rules would be the same for the Cx51) says that enum types are 16-bit from -32768 to +32767. So it seems reasonable that the compiler rejects the 0xffff and reverts to a 1 byte size. My only explaination on why you don't get a compiler error is perhaps that you are not using eu16_Force16??? -Walt