[PATCH] D118737: [CMake] Disable LLVM_ENABLE_PEDANTIC by default for GCC
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 1 14:11:37 PST 2022
MaskRay added a comment.
In D118737#3288786 <https://reviews.llvm.org/D118737#3288786>, @snehasish wrote:
> In compiler-rt (and other places with unittests) we've used SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG [1] to detect and suppress variadic macro warnings on gcc. Is that a viable approach for the motivating change?
>
> [1] https://github.com/llvm/llvm-project/blob/db8ef9463ce14f7de0e0a9f438b5e91425fba3a3/llvm/cmake/modules/AddLLVM.cmake#L1475
`-Wno-gnu-zero-variadic-macro-arguments` is Clang specific. lld/ELF can add something like `-Wno-pedantic` but it just seems to add CMake complexity to a toplevel project.
It seems to me that genuine issues detected by gcc -pedantic but not clang -pedantic are rare enough that we probably should just not bother with gcc -pedantic if it is not suppressable by a pragma.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118737/new/
https://reviews.llvm.org/D118737
More information about the llvm-commits
mailing list