[lkml]   [2019]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] perf/x86/intel: Mark expected switch fall-throughs
On Mon, 2019-06-24 at 15:53 -0500, Gustavo A. R. Silva wrote:
> On 6/24/19 3:37 PM, Peter Zijlstra wrote:
> > On Mon, Jun 24, 2019 at 12:45:54PM -0700, Joe Perches wrote:
> > > On Mon, 2019-06-24 at 21:31 +0200, Peter Zijlstra wrote:
> > > > I still consider it an abomination that the C parser looks at comments
> > > > -- other than to delete them, but OK I suppose, I'll take it.
> > > I still believe Arnaldo's/Miguel's/Shawn's/my et al. suggestion of
> > > #define __fallthrough __attribute__((fallthrough))
> > > is far better.
> > Oh yes, worlds better. Please, can we haz that instead?
> Once the C++17 `__attribute__((fallthrough))` is more widely handled by C compilers,
> static analyzers, and IDEs, we can switch to using that instead.
> Also, we are a few
> warnings away (less than five) from being able to enable -Wimplicit-fallthrough. After
> this option has been finally enabled (in v5.3) we can easily go and replace the comments
> to whatever we agree upon.

I doubt waiting is better.
If the latest compilers catch it, it's
probably good enough.

fallthrough or __fallthrough. I don't care which.

I also doubt most static analyzers will parse all
#include headers to find the #define.

 \ /
  Last update: 2019-06-24 22:59    [W:0.109 / U:32.080 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site