https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111895
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2023-10-20 Status|UNCONFIRMED |NEW Keywords| |rejects-valid --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Reduced: enum class o_field : unsigned char { no, yes, different_from_s }; struct fields { o_field o : 2; }; bool func(fields f) { return static_cast<bool>(f.o); } EDG also accepts this. GCC fails with the same error since 4.8.1 (and before that we didn't allow the non-integral bit-field so failed for a different reason).