Re: [PATCH] c++: Fix spurious fallthrough warning on break

2018-02-20 Thread Siddhesh Poyarekar
On Tuesday 20 February 2018 03:14 PM, Jakub Jelinek wrote: > On Mon, Feb 19, 2018 at 09:59:00PM +0530, Siddhesh Poyarekar wrote: >> The C++ frontend generates a break that results in the fallthrough >> warning misfiring in nested switch blocks where cases in the inner >> switch block return,

Re: [PATCH] c++: Fix spurious fallthrough warning on break

2018-02-20 Thread Jakub Jelinek
On Mon, Feb 19, 2018 at 09:59:00PM +0530, Siddhesh Poyarekar wrote: > The C++ frontend generates a break that results in the fallthrough > warning misfiring in nested switch blocks where cases in the inner > switch block return, rendering the break pointless. The fallthrough > detection in

Re: [PATCH] c++: Fix spurious fallthrough warning on break

2018-02-20 Thread Siddhesh Poyarekar
On Monday 19 February 2018 09:59 PM, Siddhesh Poyarekar wrote: > The C++ frontend generates a break that results in the fallthrough > warning misfiring in nested switch blocks where cases in the inner > switch block return, rendering the break pointless. The fallthrough > detection in

[PATCH] c++: Fix spurious fallthrough warning on break

2018-02-19 Thread Siddhesh Poyarekar
The C++ frontend generates a break that results in the fallthrough warning misfiring in nested switch blocks where cases in the inner switch block return, rendering the break pointless. The fallthrough detection in finish_break_stmt does not work either because the condition is encoded as an