This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/80460] Incorrect fallthrough warning after [[noreturn]] function inside always-true conditional


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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Would that disable warning for:
if (0)
  switch (x)
    {
    case 5:
      x++;
    case 6:
      x += 17;
      break;
    }
?
Perhaps that is ok.  Wouldn't that also disable warning for:
  if (x > 24)
    goto lab;
  if (0)
    {
     lab:
      switch (x)
        {
        case 37:
          x++;
        case 38:
          x += 18;
          break;
        }
    }
?  On the latter we should warn...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]