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

--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #5)

I would think warning in this case should be fine, just as it is on the below
when NDEBUG is defined:

int f (int i)
{
  if (i == 0)   // -Wduplicated-branches (good)
    return 0;
  else {
#ifndef NDEBUG
  assert (i > 0);
#endif
    return 0;
  }
}

Reply via email to