https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117689
--- Comment #2 from sandra at gcc dot gnu.org --- More specifically, gcc accepts enum e; static enum e thing; enum e { e1, e2, e3}; but rejects enum e; int foo (void) { static enum e thing; return -1; } enum e { e1, e2, e3}; and also rejects int foo (void) { enum e; static enum e thing; enum e { e1, e2, e3}; return -1; }