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 (version 9)


On Tue, Sep 27, 2016 at 02:27:12PM +0200, Florian Weimer wrote:
> * Marek Polacek:
> 
> > On Tue, Sep 27, 2016 at 01:46:08PM +0200, Markus Trippelsdorf wrote:
> >> I'm also wondering about the situation where not a single break is used
> >> in all of the cases. It would be best not to warn here.
> >
> > This is tricky and I'm afraid all I can offer here is to use the diagnostics
> > pragma to suppress the warning for Duff's device-like constructs.
> 
> Would it make sense to apply the fallthrough attribute to the entire
> switch statement to address such scenarios?  Currently, that does not
> seem supported.

I've been thinking about this, too.  But I think we'd have to invent
a new attribute, e.g. no_warn_fallthrough or so.

	Marek


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