This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Implement -Wimplicit-fallthrough: the rest


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:
> > >  	  result = type;
> > > +	  gcc_fallthrough ();
> > >  	default: break;
> > >  	}
> > >        break;
> > > @@ -32345,6 +32352,7 @@ rs6000_handle_altivec_attribute (tree *node,
> > >  	case SImode: case V4SImode: result = bool_V4SI_type_node; break;
> > >  	case HImode: case V8HImode: result = bool_V8HI_type_node; break;
> > >  	case QImode: case V16QImode: result = bool_V16QI_type_node;
> > > +	  gcc_fallthrough ();
> > >  	default: break;
> > >  	}
> > >        break;
> > > @@ -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?
> 
> Also, please just add a break for cases like this. The last one ought to be
> an if statement in any case.

With the current version code like that shouldn't need any adjustments since
we shouldn't warn on it.

	Marek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]