[Bug sanitizer/81275] [5/6/7/8 Regression] -fsanitize=thread produce incorrect -Wreturn-type warning
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 25 14:49:00 GMT 2017
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.
More information about the Gcc-bugs
mailing list