isuckatcs added inline comments.

================
Comment at: clang/test/Analysis/array-punned-region.c:23
+  BITFIELD_CAST *pff = &ff;
+  int a = *((int *)pff + 2); // expected-warning{{Assigned value is garbage or 
undefined [core.uninitialized.Assign]}}
+  return a;
----------------
@steakhal @martong @NoQ 

Isn't this actually a false positive here?

`(int *)pff + 2` points to `ff.b[1]`, which is initialized to `0`. 

https://godbolt.org/z/Gh8a4aMe8







Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124349/new/

https://reviews.llvm.org/D124349

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to