[libc-commits] [PATCH] D142921: [libc] Fix reusing/redefining `FPBits` symbols.
Tue Ly via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Jan 31 19:57:04 PST 2023
lntue added a comment.
In D142921#4095301 <https://reviews.llvm.org/D142921#4095301>, @sivachandra wrote:
> Can you explain how some of the use cases here are different from https://godbolt.org/z/arvG69d79.
I'm not so sure why there were warnings by gcc in the github issue, but not in godbolt example. My guess is that they are from the constructors:
- Without `using FPBits = FPBits<float>`, something like `FPBits(1.0)` will be understood as `FPBits<double>(1.0)`
- With `using FPBits = FPBits<float>`, `FPBits(1.0)` now will be `FPBits<float>(1.0)` from implicit conversion.
These warnings seem to be inconsistent between different compilers and maybe different versions, but I think it's good to clean them up to prevent ambiguity.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142921/new/
https://reviews.llvm.org/D142921
More information about the libc-commits
mailing list