This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/81275] [5/6/7/8 Regression] -fsanitize=thread produce incorrect -Wreturn-type warning
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 25 Jul 2017 14:48:42 +0000
- Subject: [Bug sanitizer/81275] [5/6/7/8 Regression] -fsanitize=thread produce incorrect -Wreturn-type warning
- Auto-submitted: auto-generated
- References: <bug-81275-4@http.gcc.gnu.org/bugzilla/>
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.