Implement -Wimplicit-fallthrough: the rest

Marek Polacek polacek@redhat.com
Wed Jul 27 16:48:00 GMT 2016


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;
> >  	}
> >      default: break;
> 
> I thought we don't warn on these anymore?
 
It warned, but not anymore.

> Also, as others said, I think it would be best to split this patch into:
> 1) bugfixes part (where you've added break; that was missing and it changes
>    (fixes) behavior)
> 2) questionable cases (your XX), with request for the corresponding
>    maintainers to decide
> 3) the actual addition of the attribute/comments or tweaking their wording,
>    so that for intentional fallthrus we don't warn

Ok, I'll do so momentarily.

	Marek



More information about the Gcc-patches mailing list