https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99707
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Gcc does not know that x will be negative. Note: x == -1.0 is well defined. As x is converted to double from unsigned int. -Wconversion might warn about this but I have not tried.