https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16804
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msebor at gcc dot gnu.org --- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> --- GCC does diagnose the initialization with -Wc++-compat so it seems that making this work as suggested is just a matter of including the same warning in -Wincompatible-pointer-types: $ gcc -S -Wc++-compat -xc z.C z.C:3:27: warning: pointer target types incompatible in C++ [-Wc++-compat] 3 | enum Moo (*Miau) (void) = quack; | ^~~~~ Even if enums are strictly compatible with unsigned the mismatch still is suggestive of a mistake on the part of the programmer and the warning would help detect it.