[Bug c/80959] -Wreturn-type "control reaches end of non-void function" false positive with -fsanitize=address

2017-06-08 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80959 --- Comment #5 from Martin Liška --- Can be also simulated with ObjC: $ cat /tmp/objc.m volatile int i; int foo (void) { @try { switch (i) { case 1: switch (i) { default: return 0;

[Bug c/80959] -Wreturn-type "control reaches end of non-void function" false positive with -fsanitize=address

2017-06-08 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80959 --- Comment #4 from Martin Liška --- So there's explanation what happens: 1) w/o -fsanitize=address: decide_copy_try_finally returns true and so that we copy BB that contains finally statement: foo () { int n; int D.1806; bar (&n); i.

[Bug c/80959] -Wreturn-type "control reaches end of non-void function" false positive with -fsanitize=address

2017-06-02 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80959 Martin Liška changed: What|Removed |Added CC||marxin at gcc dot gnu.org --- Comment #3

[Bug c/80959] -Wreturn-type "control reaches end of non-void function" false positive with -fsanitize=address

2017-06-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80959 Richard Biener changed: What|Removed |Added Keywords||diagnostic, |

[Bug c/80959] -Wreturn-type "control reaches end of non-void function" false positive with -fsanitize=address

2017-06-02 Thread simon.marchi at polymtl dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80959 --- Comment #1 from Simon Marchi --- Forgot to mention, the initial problem I stumbled on was this function: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=bfd/mach-o-i386.c;h=b2f02415c3ae019224b25184539237d530c5bc7e;hb=HEAD#l