https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97266

--- Comment #6 from m farazma <mfarazma.ext at gmail dot com> ---
(In reply to Jonathan Wakely from comment #5)
> 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.

When using clang 12 there are no warning messages. We had to 
use "-Wno-int-in-bool-context" to disable the warning on gcc.

Reply via email to