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 sanitizer/81275] [5/6/7/8 Regression] -fsanitize=thread produce incorrect -Wreturn-type warning


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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
You get the same thing with any other cleanup, say:
struct C { C (); ~C (); };
int
foo (int a, int b)
{
  C c;
  switch (a)
    {
    case 0:
      switch (b)
        {
        default:
          return 0;
        }
      break;
    default:
      return 0;
    }
}
with just -Wreturn-type will warn too.  And no optimizations, with -O1 and
above the eh pass optimizes it away.

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