File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,12 @@ Potentially Breaking Changes
4242C/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
5152C++ Specific Potentially Breaking Changes
5253-----------------------------------------
You can’t perform that action at this time.
0 commit comments