Is there any way to have the compiler treat mixed enums as errors? For example, I do not want the code below to be compiled.
enum foo {
a,
b,
c
};
enum bar {
d,
e,
f
};
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
enum foo zot = a;
enum bar zaz = d;
zaz = a;
return 0;
}