https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123153
Bug ID: 123153
Summary: trunk/gcc/tree-vect-loop-manip.cc:1979:
Wliteral-conversion
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
This mornings build of gcc trunk with clang produces:
../../trunk/gcc/tree-vect-loop-manip.cc:1979:37: warning: implicit conversion
from 'double' to 'uint32_t' (aka 'unsigned int') changes value from 0.5 to 0
[-Wliteral-conversion]
Source code is
profile_probability probability (0.5, GUESSED);
But the constructors only accept integers.
Git blame says:
89fb47c1ce4e gcc/tree-vect-loop-manip.cc (Victor Do Nascimento 2025-11-06
10:24:43 +0000 1979) profile_probability probability (0.5, GUESSED);
Wfloat-conversion might well have caught this problem, but
it's not in -Wall or -Wextra.