Skip to content

Commit aef96a6

Browse files
committed
add a few new warnings to the 10.0 clang release notes
1 parent 92f7aeb commit aef96a6

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,28 @@ Improvements to Clang's diagnostics
7878

7979
- ``-Wbitwise-op-parentheses`` and ``-Wlogical-op-parentheses`` are disabled by default.
8080

81+
- The new warnings ``Wc99-designator`` and ``-Wreorder-init-list`` warn about
82+
uses of C99 initializers in C++ mode for cases that are valid in C99 but not
83+
in C++20.
84+
85+
- The new warning ``-Wsizeof-array-div`` catches cases like
86+
``int arr[10]; ...sizeof(arr) / sizeof(short)...``
87+
(should be ``sizeof(arr) / sizeof(int)``), and the existing warning
88+
``-Wsizeof-pointer-div`` catches more cases.
89+
90+
- The new warning ``-Wxor-used-as-pow`` warns on cases where it looks like
91+
the xor operator ``^`` is used to be mean exponentiation, e.g. ``2 ^ 16``.
92+
93+
- The new warning ``-Wfinal-dtor-non-final-class`` warns on classes that
94+
have a final destructor but aren't themselves marked final.
95+
96+
- ``-Wextra`` now enables ``-Wdeprecated-copy``. The warning deprecates
97+
move and copy constructors in classes where an explicit destructor is
98+
declared. This is for compatibility with GCC 9, and forward looking
99+
for a change that's being considered for C++23. You can disable it with
100+
``-Wno-deprecated-copy``.
101+
102+
81103
Non-comprehensive list of changes in this release
82104
-------------------------------------------------
83105

0 commit comments

Comments
 (0)