[libcxx-commits] [PATCH] D66422: [libcxx] Explicitly cast in generate_canonical
Brian Cain via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 19 14:19:02 PDT 2019
bcain added a comment.
This patch is intended to address new warnings like the one below that shows up with `clang` on a `hexagon` target:
libcxx/include/random:3650:40: error: implicit conversion from 'unsigned long' to 'float' changes value from 2147483645 to 2147483648 [-Werror,-Wimplicit-int-float-conversion]
const _RealType _Rp = _URNG::max() - _URNG::min() + _RealType(1);
~~~~~~~~~~~~~^~~~~~~~~~~~~~ ~
I *think* the behavior is intended/expected, so that's why I include explicit casts here to avoid the implicit conversion warning.
The test case has corresponding warnings and I think I'll just include those in this commit here.
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66422/new/
https://reviews.llvm.org/D66422
More information about the libcxx-commits
mailing list