Skip to content
Commit db22af0f authored by Fangrui Song's avatar Fangrui Song
Browse files

[PPC64] Use INT32_MIN instead of std::numeric_limits<int32_t>::min()

Summary:
D53821 fixed the bogus MSVC (at least 2017) C4146 warning (unary minus applied on unsigned type)
by using std::numeric_limits<int32_t>::min().
The warning was because -2147483648 is incorrectly treated as unsigned long instead of long long)

Let's use INT32_MIN which is arguably more readable.
Note, on GCC or clang, -0x80000000 works fine (ILP64: long, LP64: long long).

Reviewers: ruiu, jhenderson, sfertile, espindola

Reviewed By: sfertile

Subscribers: emaste, nemanjai, arichardson, kbarton, jsji, llvm-commits

Differential Revision: https://reviews.llvm.org/D54200

llvm-svn: 346356
parent 7d7d41de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment