https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97266
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2020-10-02 --- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- Neither of those cases are constants, and the warning documentation (and the actual diagnostic itself) talk about constants. But there's still no warning for: constexpr ValidateFlag v = c; bool t = static_cast<bool>(v); which definitely seems inconsistent. I don't know what the intended behaviour is, but it should be consistent.