Do not use bit and for conjunction of predicates (PR c/81272).
2018-02-19 Martin Liska <mliska@suse.cz> PR c/81272 * decNumber.c (decCompareOp): Do not use bit and for conjunction of predicates. From-SVN: r257815
This commit is contained in:
parent
d48fc34a45
commit
a197d3406c
|
@ -1,3 +1,9 @@
|
|||
2018-02-19 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR c/81272
|
||||
* decNumber.c (decCompareOp): Do not use bit and
|
||||
for conjunction of predicates.
|
||||
|
||||
2018-01-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Update copyright years.
|
||||
|
|
|
@ -6029,11 +6029,11 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
|
|||
|
||||
/* If total ordering then handle differing signs 'up front' */
|
||||
if (op==COMPTOTAL) { /* total ordering */
|
||||
if (decNumberIsNegative(lhs) & !decNumberIsNegative(rhs)) {
|
||||
if (decNumberIsNegative(lhs) && !decNumberIsNegative(rhs)) {
|
||||
result=-1;
|
||||
break;
|
||||
}
|
||||
if (!decNumberIsNegative(lhs) & decNumberIsNegative(rhs)) {
|
||||
if (!decNumberIsNegative(lhs) && decNumberIsNegative(rhs)) {
|
||||
result=+1;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue