[PATCH] D118551: [ELF] De-template LinkerDriver::link. NFC

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 1 13:37:34 PST 2022


mstorsjo added a comment.

In D118551#3288646 <https://reviews.llvm.org/D118551#3288646>, @MaskRay wrote:

> In GCC the diagnostic is controlled by -pedantic/-Wpedantic.
> At least 11 correctly suppresses the warning in -stdc=c++2a mode.
>
> Unfortunately, for older language modes, `#pragma GCC diagnostic ignored "-Wpedantic"` does not suppress the diagnostic (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90843).

Hmm, that's a shame...

> We can either ignore it (GCC compiling llvm-project has many diagnostics anyway)

Not that many overall actually - building llvm+clang+lld+lldb normally only prints a couple (<10?) warnings - I try to get rid of new warnings when I notice them, if they're easily fixable... This added 7 new ones.

> or change `llvm/CMakeLists.txt` to default `LLVM_ENABLE_PEDANTIC` to off for GCC.

Hmm, maybe that would a reasonable compromise, as the warning-cleanliness of the codebase isn't kept quite as strict with GCC anyway.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118551/new/

https://reviews.llvm.org/D118551



More information about the llvm-commits mailing list