This remove the addition of flags that are already part of other options, such as -Wall
or -Wextra
; see each commit message for details. All of the flags being removed here already exist as part of -Wall
as of GCC 8, or, for Clang, all exist in -Wmost
(included in -Wall)
, or as part of -Wextra
as of Clang 7. Both of which are our minimum required compilers.
Also cherry-picks one change from #21458.
To give an example of how GCCs -Wall
has changed over the last few releases:
11.x to trunk (12.x)
Added:
0-Wzero-length-bounds
1-Wmismatched-dealloc
2-Wmismatched-new-delete (only for C/C++)
10.x to 11.x
Added:
0-Warray-parameter=2 (C and Objective-C only)
1-Wrange-loop-construct (only for C++)
2-Wsizeof-array-div
3-Wvla-parameter (C and Objective-C only)
Removed:
0-Wenum-conversion in C/ObjC;
9.x to 10.x
Added:
0-Wenum-conversion in C/ObjC;
1-Wformat-overflow
2-Wformat-truncation
3-Wzero-length-bounds
8.x to 9.x
Added:
0-Wpessimizing-move
Removed:
0-Wstringop-truncation
7.x to 8.x
Added:
0-Wcatch-value (C++ and Objective-C++ only)
1-Wmissing-attributes
2-Wmultistatement-macros
3-Wrestrict
4-Wsizeof-pointer-div
5-Wstringop-truncation