Skip to content

Remove warning about f64 -> f32 casts being potentially UB #49622

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
hanna-kruppe opened this issue Apr 3, 2018 · 0 comments
Closed

Remove warning about f64 -> f32 casts being potentially UB #49622

hanna-kruppe opened this issue Apr 3, 2018 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@hanna-kruppe
Copy link
Contributor

#15536 has turned out to be a big nothing burger, which means we can and should remove this scary sounding warning about f64 -> f32 casts.

cc @estebank

@pietroalbini pietroalbini added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 5, 2018
@estebank estebank added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Apr 13, 2018
nikic added a commit to nikic/rust that referenced this issue Apr 14, 2018
As discussed in rust-lang#15536, the LLVM documentation incorrect described
overflowing f64->f32 casts as being undefined behavior. LLVM never
treated them as such, and the documentation has been adjusted in
https://reviews.llvm.org/rL329065. As such, this warning can now
be removed.

Closes rust-lang#49622.
kennytm added a commit to kennytm/rust that referenced this issue Apr 16, 2018
Remove warning about f64->f32 cast being potential UB

As discussed in rust-lang#15536, the LLVM documentation incorrect described overflowing f64->f32 casts as being undefined behavior. LLVM never treated them as such, and the documentation has been adjusted in https://reviews.llvm.org/rL329065. As such, this warning can now be removed.

Closes rust-lang#49622.

---

I could not find any existing test checking for this warning. Should I be adding a test for the absence of the warning instead?
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants