Quantcast
Channel: What does the clang compiler's `-Weverything` option include and where is it documented? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

What does the clang compiler's `-Weverything` option include and where is it documented?

$
0
0

clang, but NOT gcc, has a -Weverything option which appears to include things such as -Wpedantic. You can test it here: https://godbolt.org/z/qcYKd1. See the top-right of the window for where I have typed in -Weverything as an explicit compiler option.

Notice the -Wvla-extension warning we get since we are relying on a C99 extension in C++ in this case, and we have -Weverything set. We get the same warning if we just use -Wpedantic, as shown here: https://godbolt.org/z/M9ahE4, indicating that -Weverything does in fact include -Wpedantic.

We get no warning if we have neither of those flags set: https://godbolt.org/z/j8sfsY.

Despite -Weverything existing and working in clang, however, I can find no documentation whatsoever on its existence, neither in the clang man pages nor in the online manual here: https://clang.llvm.org/docs/DiagnosticsReference.html. Maybe I'm looking in the wrong place? I'm not super familiar with clang's manual.

So, what does -Weverything include and where is it documented?

It seems logical to do something like -Wall -Werror -Weverything, but I don't know how that differs from just -Wall -Werror.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images