https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61469
--- Comment #16 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Thomas Mercier from comment #15) > No objection to the error message, but I would have expected a syntax error > for standards earlier than 23 which don't claim to support manually > specifying the underlying type for the enum. Like this with gcc 12: > > test.c:1:21: error: expected identifier or ‘(’ before ‘:’ token > 1 | enum node_stat_item : unsigned { Yes it is supported as an extension to older languages as the syntax does not conflict with valid code. If you want an error for the extension you can use -Werror=c11-c23-compat