Re: [PATCH v2] Add fallthrough attributes

2018-02-09 Thread Joshua Watt
On Fri, 2018-02-09 at 10:26 +0100, Mark Wielaard wrote: > On Fri, Feb 09, 2018 at 10:08:09AM +0100, Ulf Hermann wrote: > > > [...] > > > +#ifdef HAVE_FALLTHROUGH > > > + __attribute__ ((fallthrough)); > > > +#endif > > > [...] > > > > I would like to see this stanza wrapped in a macro, so tha

Re: [PATCH v2] Add fallthrough attributes

2018-02-09 Thread Mark Wielaard
On Fri, Feb 09, 2018 at 10:08:09AM +0100, Ulf Hermann wrote: > > [...] > > +#ifdef HAVE_FALLTHROUGH > > + __attribute__ ((fallthrough)); > > +#endif > > [...] > > I would like to see this stanza wrapped in a macro, so that we only have one > "#ifdef HAVE_FALLTHROUGH" in the code, not another

Re: [PATCH v2] Add fallthrough attributes

2018-02-09 Thread Ulf Hermann
> [...] > +#ifdef HAVE_FALLTHROUGH > + __attribute__ ((fallthrough)); > +#endif > [...] I would like to see this stanza wrapped in a macro, so that we only have one "#ifdef HAVE_FALLTHROUGH" in the code, not another one in every place we want to fall through. See the "internal_function" mac