[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 20 07:00:19 PDT 2025


================
@@ -42,6 +42,11 @@ Potentially Breaking Changes
 C/C++ Language Potentially Breaking Changes
 -------------------------------------------
 
+- Some old-style offsetof idioms like ``((int)(&(((struct S *)0)->field)))`` are treated
----------------
AaronBallman wrote:

This isn't really a potentially breaking change though, is it? We're potentially *unbreaking* code. So this probably belongs under `Non-comprehensive list of changes in this release`.

https://github.com/llvm/llvm-project/pull/130734


More information about the cfe-commits mailing list