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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Just adding:

  if (n+1 == 0)  __builtin_unreachable();
Right before the first malloc removes the warning as expected.

Reply via email to