sylvestre.ledru created this revision. sylvestre.ledru added a project: clang.
https://reviews.llvm.org/D38186 Files: ReleaseNotes.rst Index: ReleaseNotes.rst =================================================================== --- ReleaseNotes.rst +++ ReleaseNotes.rst @@ -78,6 +78,12 @@ when the signed integer is coerced to an unsigned type for the comparison. ``-Wsign-compare`` was adjusted not to warn in this case. +- ``-Wnull-pointer-arithmetic`` now warns about performing pointer arithmetic + on a null pointer. It has an undefined behavior if the offset is nonzero. + +- ``-Wnull-pointer-arithmetic`` now warns about arithmetic on a null pointer + treated as a cast from integer to pointer (GNU extension). + Non-comprehensive list of changes in this release -------------------------------------------------
Index: ReleaseNotes.rst =================================================================== --- ReleaseNotes.rst +++ ReleaseNotes.rst @@ -78,6 +78,12 @@ when the signed integer is coerced to an unsigned type for the comparison. ``-Wsign-compare`` was adjusted not to warn in this case. +- ``-Wnull-pointer-arithmetic`` now warns about performing pointer arithmetic + on a null pointer. It has an undefined behavior if the offset is nonzero. + +- ``-Wnull-pointer-arithmetic`` now warns about arithmetic on a null pointer + treated as a cast from integer to pointer (GNU extension). + Non-comprehensive list of changes in this release -------------------------------------------------
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits