http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56292



Jakub Jelinek <jakub at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |jakub at gcc dot gnu.org



--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-12 
09:03:44 UTC ---

func() + 2 is evaluated as (unsigned char) (((int) func ()) + 2), so when the

-Wconversion warning is diagnosed before evaluating all the constexpr

expressions into constants if possible, the warning is reasonable.

Consider

constexpr std::uint8_t func() { return 0xff; }

std::uint8_t value = func() + 2;

Reply via email to