https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105424
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Ever confirmed|0 |1 Last reconfirmed| |2022-04-28 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- > long n(end_raw - beg_raw); > if (n < 4) This means n could be negative which then converted to unsigned would be a large #. The code here is reduced too much though: value_type *dest_raw, *beg_raw = movelib::iterator_to_raw_pointer(f), *end_raw = 0; So basically you have (long)(beg_raw) < 4. Which might be true if the upper bit is set. Please attach the original preprocessed source as I have shown it was reduced too much. Plus I suspect adding a check for "n >= 0" will fix the warning too.