[PATCH] D124571: Avoid strict aliasing violation on type punning inside llvm::PointerIntPair
Argyrios Kyrtzidis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 3 21:15:55 PDT 2022
akyrtzi added inline comments.
================
Comment at: llvm/include/llvm/ADT/PointerIntPair.h:46
+
+ Ptr *getPointerAddress() { return reinterpret_cast<Ptr *>(Data); }
+ const Ptr *getPointerAddress() const { return reinterpret_cast<Ptr *>(Data); }
----------------
I'm wondering if the standard "blesses" this use of `reinterpret_cast` or whether it's some kind of UB..
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124571/new/
https://reviews.llvm.org/D124571
More information about the llvm-commits
mailing list