Re: [RFC PATCH] compiler_attributes.h: Add 'fallthrough' pseudo keyword for switch/case use
From: Joe Perches
Date: Sun Aug 04 2019 - 22:01:19 EST
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,
> This patch resolves that while adding support for the attribute.
> > 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
> If I apply your compiler attributes patch with D64838,
> I see fallthrough get expanded to
> __attribute__((__fallthrough__)) by the preprocessor.
I hope D64838 or something like it gets applied soon.
But all I could and did test was the current version.