Re: Implement -Wimplicit-fallthrough: the rest

2016-08-10 Thread Marek Polacek
On Fri, Jul 29, 2016 at 05:26:19PM +, Joseph Myers wrote: > On Fri, 22 Jul 2016, Marek Polacek wrote: > > > gcc/go/ > > * go-system.h (go_fallthrough): Define. > > * gofrontend/escape.cc (Escape_analysis_assign::assign): Add > > go_fallthrough. > > * gofrontend/expressions.cc (

Re: Implement -Wimplicit-fallthrough: the rest

2016-07-29 Thread Joseph Myers
On Fri, 22 Jul 2016, Marek Polacek wrote: > gcc/go/ > * go-system.h (go_fallthrough): Define. > * gofrontend/escape.cc (Escape_analysis_assign::assign): Add > go_fallthrough. > * gofrontend/expressions.cc (Binary_expression::do_get_backend): > Likewise. gofrontend is

Re: Implement -Wimplicit-fallthrough: the rest

2016-07-27 Thread Marek Polacek
On Fri, Jul 22, 2016 at 01:27:51PM +0200, Bernd Schmidt wrote: > On 07/22/2016 01:15 PM, Jakub Jelinek wrote: > > > @@ -32335,6 +32341,7 @@ rs6000_handle_altivec_attribute (tree *node, > > > case V4SImode: case V8HImode: case V16QImode: case V4SFmode: > > > case V2DImode: case V2DFmode: > > >

Re: Implement -Wimplicit-fallthrough: the rest

2016-07-27 Thread Marek Polacek
On Fri, Jul 22, 2016 at 01:15:41PM +0200, Jakub Jelinek wrote: > > @@ -32352,6 +32360,7 @@ rs6000_handle_altivec_attribute (tree *node, > >switch (mode) > > { > > case V8HImode: result = pixel_V8HI_type_node; > > + gcc_fallthrough (); > > default: break; > > } > > d

Re: Implement -Wimplicit-fallthrough: the rest

2016-07-22 Thread Bernd Schmidt
On 07/22/2016 01:15 PM, Jakub Jelinek wrote: @@ -32335,6 +32341,7 @@ rs6000_handle_altivec_attribute (tree *node, case V4SImode: case V8HImode: case V16QImode: case V4SFmode: case V2DImode: case V2DFmode: result = type; + gcc_fallthrough (); default: brea

Re: Implement -Wimplicit-fallthrough: the rest

2016-07-22 Thread Jakub Jelinek
On Fri, Jul 22, 2016 at 12:44:30PM +0200, Marek Polacek wrote: > ...and the boring part. It found a few bugs, e.g. in jcf-dump.c > and rs6000.c - I fixed those. > > I think generally it's better to use the attribute rather than a falls > through comment, because the latter can't be followed by ot

Implement -Wimplicit-fallthrough: the rest

2016-07-22 Thread Marek Polacek
...and the boring part. It found a few bugs, e.g. in jcf-dump.c and rs6000.c - I fixed those. I think generally it's better to use the attribute rather than a falls through comment, because the latter can't be followed by other comment or a macro to work. This patch has been tested on powerpc64l