[PATCH] D56983: [libunwind] Add casts to avoid warnings about implicit conversions losing precision
Martin Storsjö via Phabricator
reviews at reviews.llvm.org
Tue Jan 22 08:38:19 PST 2019
mstorsjo added a comment.
In D56983#1366467 <https://reviews.llvm.org/D56983#1366467>, @ldionne wrote:
> I guess my question could have been rephrased as: why doesn't `LocalAddressSpace::getRegister` return a `uint32_t` on 32 bit architectures, but that's not useful because you might just as well always return a 64 bit value, which is larger than needed in the worst case. I see why that's the right place to put this cast now.
Well, that might also be a valid way to fix it - but it's a much larger and potentially riskier endeavour. This patch just confirms to the compiler that the code currently does behave as intended in this regard, as it has worked so far.
Repository:
rUNW libunwind
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56983/new/
https://reviews.llvm.org/D56983
More information about the libcxx-commits
mailing list