[PATCH] D38186: Add the new -Wnull-pointer-arithmetic warnings to the release notes

Hal Finkel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 27 12:52:52 PDT 2017


hfinkel added inline comments.


================
Comment at: ReleaseNotes.rst:82
+- ``-Wnull-pointer-arithmetic`` now warns about performing pointer arithmetic
+  on a null pointer. It has an undefined behavior if the offset is nonzero.
+
----------------
We can probably just make this one entry:

  ``-Wnull-pointer-arithmetic`` now warns about performing pointer arithmetic on a null pointer. Such pointer arithmetic has an undefined behavior if the offset is nonzero. It also now warns about arithmetic on a null pointer treated as a cast from integer to pointer (GNU extension).



https://reviews.llvm.org/D38186





More information about the cfe-commits mailing list