Re: [PATCH] Improve -Wimplicit-fallthrough for nested switches (PR c/79153)

2017-11-30 Thread Richard Biener
On December 1, 2017 12:16:55 AM GMT+01:00, Jakub Jelinek wrote: >Hi! > >A nested switch that can fallthrough (either because it has break stmts >or because it doesn't have default: and doesn't cover all cases) isn't >unfortunately reported with -Wimplicit-fallthrough, because we first >gimplify t

Re: [PATCH] Improve -Wimplicit-fallthrough for nested switches (PR c/79153)

2017-11-30 Thread Joseph Myers
On Fri, 1 Dec 2017, Jakub Jelinek wrote: > c/ > * c-parser.c: Include tree-iterator.h. > (c_parser_switch_statement): Emit LABEL_EXPR for the break label > into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P > on it. The C front-end changes are OK. -- Josep

[PATCH] Improve -Wimplicit-fallthrough for nested switches (PR c/79153)

2017-11-30 Thread Jakub Jelinek
Hi! A nested switch that can fallthrough (either because it has break stmts or because it doesn't have default: and doesn't cover all cases) isn't unfortunately reported with -Wimplicit-fallthrough, because we first gimplify the nested switch and then we just see a label added implicitly for break