https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110933
--- Comment #3 from Andrew Pinski ---
Try -Wconversion.
Also there is no overflow here as unsigned is always defined as wrapping.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110933
--- Comment #2 from Richard Biener ---
I think there should be specific warnings for the specific cases, not one that
tries to be general.
The example you give might be -Wiv-bound-conversion?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110933
--- Comment #1 from Niklas Hambüchen ---
A tangentially related issue is bug 24542 which is about another common
overflow bug, the pattern "u64 = u32 * u32".
Just linking it here because people interested in solving integer overflow
issues may