[llvm] r233067 - Silencing some MSVC warnings "C4805: '^' : unsafe mix of type 'bool' and type 'unsigned int' in operation"; NFC.

Aaron Ballman aaron at aaronballman.com
Tue Mar 24 05:47:51 PDT 2015


Author: aaronballman
Date: Tue Mar 24 07:47:51 2015
New Revision: 233067

URL: http://llvm.org/viewvc/llvm-project?rev=233067&view=rev
Log:
Silencing some MSVC warnings "C4805: '^' : unsafe mix of type 'bool' and type 'unsigned int' in operation"; NFC.

Modified:
    llvm/trunk/lib/Support/APFloat.cpp

Modified: llvm/trunk/lib/Support/APFloat.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=233067&r1=233066&r2=233067&view=diff
==============================================================================
--- llvm/trunk/lib/Support/APFloat.cpp (original)
+++ llvm/trunk/lib/Support/APFloat.cpp Tue Mar 24 07:47:51 2015
@@ -1430,7 +1430,7 @@ APFloat::addOrSubtractSignificand(const
 
   /* Determine if the operation on the absolute values is effectively
      an addition or subtraction.  */
-  subtract ^= sign ^ rhs.sign;
+  subtract ^= static_cast<bool>(sign ^ rhs.sign);
 
   /* Are we bigger exponent-wise than the RHS?  */
   bits = exponent - rhs.exponent;





More information about the llvm-commits mailing list