about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-05-26 09:49:36 +0000
committerbors <bors@rust-lang.org>2015-05-26 09:49:36 +0000
commit8a872943ff0fac763eefa52de1ffb1344e698d98 (patch)
tree5f32fff3a69b8d16d93f01375175527c2199f742 /src/rustllvm/RustWrapper.cpp
parent7cb9914fceaeaa6a39add43d3da15bb6e1d191f6 (diff)
parent43502adf071392df3dd74f019f6973d4b757e7d7 (diff)
downloadrust-8a872943ff0fac763eefa52de1ffb1344e698d98.tar.gz
rust-8a872943ff0fac763eefa52de1ffb1344e698d98.zip
Auto merge of #25778 - econoplas:master, r=pnkfelix
A regression was introduced by commit https://github.com/rust-lang/rust/commit/7b1916d25347913fce3e336517ef22025ccd875f #25612.  Negative signed integer literals less than -9223372036854775808i64 were no longer properly reported as #[warn(overflowing_literals)].

Also adding missing test cases to test/compile-fail/lint-type-overflow.rs which could have detected the regression.

Further explanation:

The expression `(negative && v > max as u64 + 1)` relies on the fact that algebraically speaking `-min == max + 1` to avoid negation and removing the need for `min` completely.

If i128 or i256 are ever added, it should also work for these types without requiring a change to `min != i64::MIN &&` also simplifying maintenance.

r? @pnkfelix
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions