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
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
> [...]
> +#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
Adds the __attribute__ ((fallthrough)) annotation to all the places
where switch case fallthrough was occurring. This allows the
-Wimplicit-fallthrough warning to be used even after the source has been
pre-processed.
If the fallthrough attribute is supported, the -Wimplicit-fallthrough
warning is