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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org
         Resolution|FIXED                       |INVALID

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
I don't think this is a false positive: the initialization of val is in fact
implicitly converting from a value outside the range of int (but inside the
range of long long).  We are able to compute the constant value because the
function is constexpr.

The warning goes away if you make E signed by giving it a negative enumerator.

Reply via email to