https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61414
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Xidorn Quan from comment #5) > It seems G++ always throw that warning for enum class as bitfield, even when > the enum class is actually empty: > > enum class K {}; > > struct S { > > K v : 5; > > }; > > G++ would give: > > test.cpp:3:9: warning: 'S::v' is too small to hold all values of 'enum > > class K' > > K v : 5; Yes, read comment 2.