lkml.org 
[lkml]   [2019]   [Aug]   [4]   [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
From
Date
On Sun, 2019-08-04 at 18:18 -0700, Nathan Chancellor wrote:
> On Sun, Aug 04, 2019 at 05:39:28PM -0700, Joe Perches wrote:
> Hi Joe,

Hi Nathan.

> This patch resolves that while adding support for the attribute.
> https://reviews.llvm.org/D64838
[]
> > The __has_attribute use is at least clang compatible.
> > https://releases.llvm.org/3.7.0/tools/clang/docs/LanguageExtensions.html
> > even if it doesn't (seem to?) work.
>
> I was trying to follow along with this thread through the web interface
> and kind of got lost, how does it not work?

It does not work in llvm/clang mainline through
commit 305b961f64b75e73110e309341535f6d5a48ed72.

> If I apply your compiler attributes patch with D64838,
> I see fallthrough get expanded to
> __attribute__((__fallthrough__)) by the preprocessor.

Well, great.
I hope D64838 or something like it gets applied soon.
But all I could and did test was the current version.

cheers, Joe

\
 
 \ /
  Last update: 2019-08-05 04:02    [W:0.137 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site