Fix ODR violations.
This declaration in a header:
typedef enum { ... } E;
creates a new unnamed type every time that header is #include
d,
resulting in an (undiagnosed) ODR violation.
With header modules such ODR violations cause build failure with a cryptic error message.
Fix this by creating a named type instead.
Courtesy of Paul Pluzhnikov.