Re: [RFC][PATCH] c++/46476 - implement -Wunreachable-code-return

2021-12-09 Thread Martin Sebor via Gcc-patches
On 12/9/21 3:58 PM, Jim Wilson wrote: On Mon, Nov 29, 2021 at 5:21 PM Martin Sebor via Gcc-patches mailto:gcc-patches@gcc.gnu.org>> wrote: There are some other "unusual" cases worth a look, such as missing context of any kind except for like and column: elfnn-riscv.c:3346:7:

Re: [RFC][PATCH] c++/46476 - implement -Wunreachable-code-return

2021-12-09 Thread Jim Wilson via Gcc-patches
On Mon, Nov 29, 2021 at 5:21 PM Martin Sebor via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > There are some other "unusual" cases worth a look, such as missing > context of any kind except for like and column: > > elfnn-riscv.c:3346:7: warning: statement after return is not reachable >

Re: [RFC][PATCH] c++/46476 - implement -Wunreachable-code-return

2021-11-30 Thread Richard Biener via Gcc-patches
On Mon, 29 Nov 2021, Martin Sebor wrote: > On 11/26/21 5:18 AM, Richard Biener via Gcc-patches wrote: > > This implements a subset of -Wunreachable-code, unreachable code > > after a return stmt. Contrary to the previous attemt at CFG > > construction time this implements the bits during GIMPLE

Re: [RFC][PATCH] c++/46476 - implement -Wunreachable-code-return

2021-11-29 Thread Martin Sebor via Gcc-patches
On 11/26/21 5:18 AM, Richard Biener via Gcc-patches wrote: This implements a subset of -Wunreachable-code, unreachable code after a return stmt. Contrary to the previous attemt at CFG construction time this implements the bits during GIMPLE lowering where there are still all GIMPLE return stmts

Re: [RFC][PATCH] c++/46476 - implement -Wunreachable-code-return

2021-11-28 Thread Jeff Law via Gcc-patches
On 11/26/2021 5:18 AM, Richard Biener via Gcc-patches wrote: This implements a subset of -Wunreachable-code, unreachable code after a return stmt. Contrary to the previous attemt at CFG construction time this implements the bits during GIMPLE lowering where there are still all GIMPLE return

[RFC][PATCH] c++/46476 - implement -Wunreachable-code-return

2021-11-26 Thread Richard Biener via Gcc-patches
This implements a subset of -Wunreachable-code, unreachable code after a return stmt. Contrary to the previous attemt at CFG construction time this implements the bits during GIMPLE lowering where there are still all GIMPLE return stmts in the IL. The lowering phase keeps track of whether stmts