[lkml]   [2019]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH] compiler_attributes.h: Add 'fallthrough' pseudo keyword for switch/case use
On Thu, 2019-08-01 at 22:26 +0200, Miguel Ojeda wrote:
> On Thu, Aug 1, 2019 at 10:10 PM <> wrote:
> > I'm not disagreeing... I think using a macro makes sense.
> It is either a macro or waiting for 5+ years (while we keep using the
> comment style) :-)
> In case it helps to make one's mind about whether to go for it or not,
> I summarized the advantages and a few other details in the patch I
> sent in October:
> It would be nice, however, to discuss whether we want __fallthrough or
> fallthrough.

I was happy enough with either though after a bit of
playing around with both, I think the pseudo-keyword
reads quite a bit better.

linux-kernel is a constrained code base and using
underscored prefixes is not really necessary.

For instance:

_Bool is c99, but the kernel uses bool
uint8_t also, but the kernel uses u8, etc...

Yes it requires a bit of 'local knowledge',
but simpler is better.

 \ /
  Last update: 2019-08-01 22:48    [W:0.094 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site