Skip to content

Commit b8a4520

Browse files
committed
[Clang][Docs] Clarify release notes. NFC.
1 parent 32cff3e commit b8a4520

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ Potentially Breaking Changes
4242
C/C++ Language Potentially Breaking Changes
4343
-------------------------------------------
4444

45-
- Some old-style offsetof idioms like ``((int)(&(((struct S *)0)->field)))`` are treated
46-
as UB. To avoid breaking existing code, ``inbounds`` flags will not be set for such patterns.
47-
However, it is still highly recommended to use the UB-free macro ``offsetof`` or clang builtin
48-
function ``__builtin_offsetof``. It is also possible to use ``-fwrapv-pointer`` or
49-
``-fno-delete-null-pointer-checks`` to make this behavior well-defined. (#GH130734, #GH130742)
45+
- New LLVM optimizations have been implemented that optimize pointer arithmetic on
46+
null pointers more aggressively. As part of this, clang has implemented a special
47+
case for old-style offsetof idioms like ``((int)(&(((struct S *)0)->field)))``, to
48+
ensure they are not caught by these optimizations. It is also possible to use
49+
``-fwrapv-pointer`` or ``-fno-delete-null-pointer-checks`` to make pointer arithmetic
50+
on null pointers well-defined. (#GH130734, #GH130742)
5051

5152
C++ Specific Potentially Breaking Changes
5253
-----------------------------------------

0 commit comments

Comments
 (0)