[llvm-dev] RFC Enable -Wimplicit-fallthrough for clang as well as GCC

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 7 07:41:07 PST 2018


On Wed, Nov 7, 2018 at 5:26 AM Mikael Holmén <mikael.holmen at ericsson.com>
wrote:

> Does this mean that the clang version mentioned on
>
> https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library
>
> should be updated since it currently says that 3.1 is ok?
>
> I noticed that one of our build-bots that ran clang 3.5.0 failed since
> it ended up in the
>
>   #define LLVM_FALLTHROUGH
>
> part of the ifdefs in include/llvm/Demangle/Compiler.h
>

No, I don't think that's necessary, it just means we aren't warning clean
with those versions. I don't think "supported" has to imply that LLVM and
clang build without warnings, since the user can disable warnings or
disable -Werror. I recently built with GCC 7 when testing my changes to
libc++, and there were a handful of warnings in clang. That doesn't mean we
don't support GCC 7.

It's also very likely that clang 3.5 supports a different spelling of the
attribute, like [[clang::fallthrough]], and it would be willing to take a
patch to make it warning clean again.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181107/36d563b2/attachment.html>


More information about the llvm-dev mailing list