Re: [PATCH] compiler/compiler-gcc: Add __fallthrough

From: Joe Perches
Date: Fri Feb 10 2017 - 13:50:27 EST


On Fri, 2017-02-10 at 14:18 -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Feb 10, 2017 at 09:08:35AM -0800, Joe Perches escreveu:
> > gcc v7.0 can warn on missing break statements from case labels
> > using a special __attribute__((fallthrough))__ marker.
> >
> > Add a __fallthrough convenience macro for gcc versions >= 7 and
> > make the generic use of __fallthrough a no-op.
>
> Can you state in the log message were this idea came from? Say,
> something like:
>
> "This was introduced in the tools/include/linux/compiler.h, where it was
> first noticed while buildint tools/perf/ in a Fedora Rawhide
> environment."

The request is from at least 2002.

Maybe Andrew could add a link like:

Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652

if he applies it.