Does anyone knows if it is possible to get the compiler to check if two enums overlap?
We have several SW packages, were each has an enum with eeprom address definitions Is there a way to get the compiler to combine these and check for overlaps?
typedef enum
{
DEF_A = 1,
DEF_B = 2
} Enum1;
typedef enum
{
DEF_C = 1,
DEF_D = 3
} Enum2;
enum
{
Enum1,
Enum2
};
=> Generate compile error since DEF_1 and DEF_3 has the same value