Thread (17 messages) 17 messages, 4 authors, 2019-08-05

Re: [PATCH] net: sctp: Rename fallthrough label to unhandled

From: Joe Perches <joe@perches.com>
Date: 2019-07-31 16:35:40
Also in: linux-sctp, lkml

On Wed, 2019-07-31 at 08:16 -0400, Neil Horman wrote:
On Wed, Jul 31, 2019 at 04:32:43AM -0700, Joe Perches wrote:
quoted
On Wed, 2019-07-31 at 07:19 -0400, Neil Horman wrote:
quoted
On Tue, Jul 30, 2019 at 10:04:37PM -0700, Joe Perches wrote:
quoted
fallthrough may become a pseudo reserved keyword so this only use of
fallthrough is better renamed to allow it.

Signed-off-by: Joe Perches <joe@perches.com>
Are you referring to the __attribute__((fallthrough)) statement that gcc
supports?  If so the compiler should by all rights be able to differentiate
between a null statement attribute and a explicit goto and label without the
need for renaming here.  Or are you referring to something else?
Hi.

I sent after this a patch that adds

# define fallthrough                    __attribute__((__fallthrough__))

https://lore.kernel.org/patchwork/patch/1108577/

So this rename is a prerequisite to adding this #define.
why not just define __fallthrough instead, like we do for all the other
attributes we alias (i.e. __read_mostly, __protected_by, __unused, __exception,
etc)
Because it's not as intelligible when used as a statement.


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help