[libc-commits] [libc] [libc][complex] Silence `pedantic` warning (PR #112239)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Tue Oct 15 08:27:00 PDT 2024
nickdesaulniers wrote:
> And for some reason, adding Wno-c99-extensions there still not suppresses _Complex warnings.
Yes it does: https://godbolt.org/z/aacj54rdM `-Wno-*` needs to occur AFTER `-Wpedantic`. The way these work in Clang (and GCC which Clang matches its behavior from (AFAIK)) is that the last occurrence of these on the command line "wins." `-Wpedantic` is a "group" that enables a bunch of warnings implicitly, so then after you'd need to re-disable the flags you want.
`-Wpedatic` to me means we're sticking with strict ISO C (or C++). If we use extensions (that are supported by the two compilers we support), then `-Wpedantic` doesn't add much value IMO.
https://github.com/llvm/llvm-project/pull/112239
More information about the libc-commits
mailing list