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

Vincent Lefèvre <vincent-gcc at vinc17 dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vincent-gcc at vinc17 dot net

--- Comment #2 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
Simpler code, also for C:

int f (void)
{
  unsigned int x = 5;
  return 0 && x < 0 ? 1 : 0;
}

Alternatively:

int f (void)
{
  unsigned int x = 5;
  if (0)
    return x < 0 ? 1 : 0;
  return 0;
}

With -Wtype-limits, GCC 12.2.0 warns on both.

Reply via email to