summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHartmut Kaiser <hartmut.kaiser@gmail.com>2007-10-25 23:15:31 +0000
committerHartmut Kaiser <hartmut.kaiser@gmail.com>2007-10-25 23:15:31 +0000
commitfc69d322f2af7182c907d8270569a4487290441d (patch)
treeef0afd77fc5164653cbf16ba8d039bb916a55d6c
parentd57aca25fc7d41da11efd8577d86a66609f200a5 (diff)
downloadbcm5719-llvm-fc69d322f2af7182c907d8270569a4487290441d.tar.gz
bcm5719-llvm-fc69d322f2af7182c907d8270569a4487290441d.zip
Clarified operator precedence.
Silenced VC++ warning. llvm-svn: 43372
-rw-r--r--llvm/lib/Support/APFloat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index be54cdb52c6..8cc916e6855 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -1230,7 +1230,7 @@ APFloat::addOrSubtractSpecials(const APFloat &rhs, bool subtract)
case convolve(fcInfinity, fcInfinity):
/* Differently signed infinities can only be validly
subtracted. */
- if(sign ^ rhs.sign != subtract) {
+ if((sign ^ rhs.sign) != subtract) {
makeNaN();
return opInvalidOp;
}
@@ -1252,7 +1252,7 @@ APFloat::addOrSubtractSignificand(const APFloat &rhs, bool subtract)
/* Determine if the operation on the absolute values is effectively
an addition or subtraction. */
- subtract ^= (sign ^ rhs.sign);
+ subtract ^= (sign ^ rhs.sign) ? true : false;
/* Are we bigger exponent-wise than the RHS? */
bits = exponent - rhs.exponent;
OpenPOWER on IntegriCloud