https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71224

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think the warning is correct and here is why:
If we look at the final code which is produced on the tree level:

  _3 = pthis_2(D)->length;
  _4 = _3 + 1;
  if (_3 > _4)
    goto <bb 4>;
  else
    goto <bb 3>;

If pthis_2(D)->length was UINT_MAX, then that UINT_MAX > UINT_MAX + 1 would be
true while for all other cases, it is false.

Reply via email to