When run with -w, GCC disables all warnings, including those which have been explicitly promoted to errors with -Werror=warningname. Clang’s -w disables all warnings *except* those which have been so promoted. For example: $ cat <<EOF >c.c > void f() { > int x; > if (x = 1) {} > } > EOF $ gcc -Werror=parentheses -w -c -o /dev/null c.c $ clang -Werror=parentheses -w -c -o /dev/null c.c c.c:3:9: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses] if (x = 1) {} ~~^~~ c.c:3:9: note: place parentheses around the assignment to silence this warning if (x = 1) {} ^ ( ) c.c:3:9: note: use '==' to turn this assignment into an equality comparison if (x = 1) {} ^ == 1 error generated. This is already a FIXME in DiagnosticIDs.cpp (https://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/DiagnosticIDs.cpp?revision=331834&view=markup#l460).
Fixed with https://github.com/llvm/llvm-project/commit/3f8b9166989709d1d893524f5590f8064e824554