[Bug sanitizer/91389] [7/8/9/10 Regression] error: control reaches end of non-void function with -fsanitize=thread since r219201

2019-08-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91389 --- Comment #7 from Jakub Jelinek --- Forgot to say, if you are just looking for a workaround for the warning (note, -O2 -Wreturn-type doesn't warn, in this case you need also no optimizations), then I'd just move the return from the default: cla

[Bug sanitizer/91389] [7/8/9/10 Regression] error: control reaches end of non-void function with -fsanitize=thread since r219201

2019-08-08 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91389 --- Comment #6 from Martin Liška --- (In reply to Jakub Jelinek from comment #5) > (In reply to Martin Liška from comment #4) > > (In reply to Jakub Jelinek from comment #3) > > > I see dead code everywhere in the function, they must have some we

[Bug sanitizer/91389] [7/8/9/10 Regression] error: control reaches end of non-void function with -fsanitize=thread since r219201

2019-08-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91389 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug sanitizer/91389] [7/8/9/10 Regression] error: control reaches end of non-void function with -fsanitize=thread since r219201

2019-08-08 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91389 --- Comment #4 from Martin Liška --- (In reply to Jakub Jelinek from comment #3) > I see dead code everywhere in the function, they must have some weirdo macro > for cases that wraps everything in case something { ... } break; Is the 'break;' re

[Bug sanitizer/91389] [7/8/9/10 Regression] error: control reaches end of non-void function with -fsanitize=thread since r219201

2019-08-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91389 --- Comment #3 from Jakub Jelinek --- I see dead code everywhere in the function, they must have some weirdo macro for cases that wraps everything in case something { ... } break; Many of those break; statements are dead code.

[Bug sanitizer/91389] [7/8/9/10 Regression] error: control reaches end of non-void function with -fsanitize=thread since r219201

2019-08-08 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91389 --- Comment #2 from Martin Liška --- Created attachment 46688 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46688&action=edit Original test-case I'm fine with the approach to remove a dead code. However, I can't easily find what to change

[Bug sanitizer/91389] [7/8/9/10 Regression] error: control reaches end of non-void function with -fsanitize=thread since r219201

2019-08-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91389 --- Comment #1 from Jakub Jelinek --- Don't do it then? The no fallthru early discovery isn't perfect and with the sanitizer instrumentation it gets even harder. Looks like a dup of PR86899 to me anyway. If I do a small modification like: class