diff options
| author | bors <bors@rust-lang.org> | 2018-05-21 21:16:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-21 21:16:16 +0000 |
| commit | cb20f68d0f9e1c1bf49df22991b5a0d1a43146e8 (patch) | |
| tree | af543ddadc9ac77c8ae3d90f264104b8dc3d746e /src/rustllvm/RustWrapper.cpp | |
| parent | 56e541ddf1ee9a4e9d65a3cf6f952c31c3edf5ef (diff) | |
| parent | 50bc72df448dc284e4ffdc296a85aad3282dc99e (diff) | |
| download | rust-cb20f68d0f9e1c1bf49df22991b5a0d1a43146e8.tar.gz rust-cb20f68d0f9e1c1bf49df22991b5a0d1a43146e8.zip | |
Auto merge of #50812 - kennytm:fix-50756-miri-bad-float-behavior, r=oli-obk
Fix issue #50811 (`NaN > NaN` was true). Fix #50811 Make sure the float comparison output is consistent with the expected behavior when NaN is involved. ---- Note: This PR is a **BREAKING CHANGE**. If you have used `>` or `>=` to compare floats, and make the result as the length of a fixed array type, like: ```rust use std::f64::NAN; let x: [u8; (NAN > NAN) as usize] = [1]; ``` then the code will no longer compile. Previously, all float comparison involving NaN will just return "Greater", i.e. `NAN > NAN` would wrongly return `true` during const evaluation. If you need to retain the old behavior (why), you may replace `a > b` with `a != a || b != b || a > b`.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
