Commit ac1d1920 authored by Djordje.Pesic's avatar Djordje.Pesic Committed by Commit bot

Fix more -Wsign-compare bugs with GCC 4.9.2

Review URL: https://codereview.chromium.org/1152993005

Cr-Commit-Position: refs/heads/master@{#28800}
parent 570ed526
......@@ -3369,28 +3369,28 @@ TEST(class_fmt) {
Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
USE(dummy);
// Expected double results.
CHECK_EQ(bit_cast<uint64_t>(t.dSignalingNan), 0x001);
CHECK_EQ(bit_cast<uint64_t>(t.dQuietNan), 0x002);
CHECK_EQ(bit_cast<uint64_t>(t.dNegInf), 0x004);
CHECK_EQ(bit_cast<uint64_t>(t.dNegNorm), 0x008);
CHECK_EQ(bit_cast<uint64_t>(t.dNegSubnorm), 0x010);
CHECK_EQ(bit_cast<uint64_t>(t.dNegZero), 0x020);
CHECK_EQ(bit_cast<uint64_t>(t.dPosInf), 0x040);
CHECK_EQ(bit_cast<uint64_t>(t.dPosNorm), 0x080);
CHECK_EQ(bit_cast<uint64_t>(t.dPosSubnorm), 0x100);
CHECK_EQ(bit_cast<uint64_t>(t.dPosZero), 0x200);
CHECK_EQ(bit_cast<int64_t>(t.dSignalingNan), 0x001);
CHECK_EQ(bit_cast<int64_t>(t.dQuietNan), 0x002);
CHECK_EQ(bit_cast<int64_t>(t.dNegInf), 0x004);
CHECK_EQ(bit_cast<int64_t>(t.dNegNorm), 0x008);
CHECK_EQ(bit_cast<int64_t>(t.dNegSubnorm), 0x010);
CHECK_EQ(bit_cast<int64_t>(t.dNegZero), 0x020);
CHECK_EQ(bit_cast<int64_t>(t.dPosInf), 0x040);
CHECK_EQ(bit_cast<int64_t>(t.dPosNorm), 0x080);
CHECK_EQ(bit_cast<int64_t>(t.dPosSubnorm), 0x100);
CHECK_EQ(bit_cast<int64_t>(t.dPosZero), 0x200);
// Expected float results.
CHECK_EQ(bit_cast<uint32_t>(t.fSignalingNan), 0x001);
CHECK_EQ(bit_cast<uint32_t>(t.fQuietNan), 0x002);
CHECK_EQ(bit_cast<uint32_t>(t.fNegInf), 0x004);
CHECK_EQ(bit_cast<uint32_t>(t.fNegNorm), 0x008);
CHECK_EQ(bit_cast<uint32_t>(t.fNegSubnorm), 0x010);
CHECK_EQ(bit_cast<uint32_t>(t.fNegZero), 0x020);
CHECK_EQ(bit_cast<uint32_t>(t.fPosInf), 0x040);
CHECK_EQ(bit_cast<uint32_t>(t.fPosNorm), 0x080);
CHECK_EQ(bit_cast<uint32_t>(t.fPosSubnorm), 0x100);
CHECK_EQ(bit_cast<uint32_t>(t.fPosZero), 0x200);
CHECK_EQ(bit_cast<int32_t>(t.fSignalingNan), 0x001);
CHECK_EQ(bit_cast<int32_t>(t.fQuietNan), 0x002);
CHECK_EQ(bit_cast<int32_t>(t.fNegInf), 0x004);
CHECK_EQ(bit_cast<int32_t>(t.fNegNorm), 0x008);
CHECK_EQ(bit_cast<int32_t>(t.fNegSubnorm), 0x010);
CHECK_EQ(bit_cast<int32_t>(t.fNegZero), 0x020);
CHECK_EQ(bit_cast<int32_t>(t.fPosInf), 0x040);
CHECK_EQ(bit_cast<int32_t>(t.fPosNorm), 0x080);
CHECK_EQ(bit_cast<int32_t>(t.fPosSubnorm), 0x100);
CHECK_EQ(bit_cast<int32_t>(t.fPosZero), 0x200);
}
}
......@@ -3686,88 +3686,88 @@ TEST(C_COND_FMT) {
test.fOp1 = 2.0;
test.fOp2 = 3.0;
(CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
CHECK_EQ(test.dF, 0);
CHECK_EQ(test.dUn, 0);
CHECK_EQ(test.dEq, 0);
CHECK_EQ(test.dUeq, 0);
CHECK_EQ(test.dOlt, 1);
CHECK_EQ(test.dUlt, 1);
CHECK_EQ(test.dOle, 1);
CHECK_EQ(test.dUle, 1);
CHECK_EQ(test.fF, 0);
CHECK_EQ(test.fUn, 0);
CHECK_EQ(test.fEq, 0);
CHECK_EQ(test.fUeq, 0);
CHECK_EQ(test.fOlt, 1);
CHECK_EQ(test.fUlt, 1);
CHECK_EQ(test.fOle, 1);
CHECK_EQ(test.fUle, 1);
CHECK_EQ(test.dF, 0U);
CHECK_EQ(test.dUn, 0U);
CHECK_EQ(test.dEq, 0U);
CHECK_EQ(test.dUeq, 0U);
CHECK_EQ(test.dOlt, 1U);
CHECK_EQ(test.dUlt, 1U);
CHECK_EQ(test.dOle, 1U);
CHECK_EQ(test.dUle, 1U);
CHECK_EQ(test.fF, 0U);
CHECK_EQ(test.fUn, 0U);
CHECK_EQ(test.fEq, 0U);
CHECK_EQ(test.fUeq, 0U);
CHECK_EQ(test.fOlt, 1U);
CHECK_EQ(test.fUlt, 1U);
CHECK_EQ(test.fOle, 1U);
CHECK_EQ(test.fUle, 1U);
test.dOp1 = std::numeric_limits<double>::max();
test.dOp2 = std::numeric_limits<double>::min();
test.fOp1 = std::numeric_limits<float>::min();
test.fOp2 = std::numeric_limits<float>::lowest();
(CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
CHECK_EQ(test.dF, 0);
CHECK_EQ(test.dUn, 0);
CHECK_EQ(test.dEq, 0);
CHECK_EQ(test.dUeq, 0);
CHECK_EQ(test.dOlt, 0);
CHECK_EQ(test.dUlt, 0);
CHECK_EQ(test.dOle, 0);
CHECK_EQ(test.dUle, 0);
CHECK_EQ(test.fF, 0);
CHECK_EQ(test.fUn, 0);
CHECK_EQ(test.fEq, 0);
CHECK_EQ(test.fUeq, 0);
CHECK_EQ(test.fOlt, 0);
CHECK_EQ(test.fUlt, 0);
CHECK_EQ(test.fOle, 0);
CHECK_EQ(test.fUle, 0);
CHECK_EQ(test.dF, 0U);
CHECK_EQ(test.dUn, 0U);
CHECK_EQ(test.dEq, 0U);
CHECK_EQ(test.dUeq, 0U);
CHECK_EQ(test.dOlt, 0U);
CHECK_EQ(test.dUlt, 0U);
CHECK_EQ(test.dOle, 0U);
CHECK_EQ(test.dUle, 0U);
CHECK_EQ(test.fF, 0U);
CHECK_EQ(test.fUn, 0U);
CHECK_EQ(test.fEq, 0U);
CHECK_EQ(test.fUeq, 0U);
CHECK_EQ(test.fOlt, 0U);
CHECK_EQ(test.fUlt, 0U);
CHECK_EQ(test.fOle, 0U);
CHECK_EQ(test.fUle, 0U);
test.dOp1 = std::numeric_limits<double>::lowest();
test.dOp2 = std::numeric_limits<double>::lowest();
test.fOp1 = std::numeric_limits<float>::max();
test.fOp2 = std::numeric_limits<float>::max();
(CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
CHECK_EQ(test.dF, 0);
CHECK_EQ(test.dUn, 0);
CHECK_EQ(test.dEq, 1);
CHECK_EQ(test.dUeq, 1);
CHECK_EQ(test.dOlt, 0);
CHECK_EQ(test.dUlt, 0);
CHECK_EQ(test.dOle, 1);
CHECK_EQ(test.dUle, 1);
CHECK_EQ(test.fF, 0);
CHECK_EQ(test.fUn, 0);
CHECK_EQ(test.fEq, 1);
CHECK_EQ(test.fUeq, 1);
CHECK_EQ(test.fOlt, 0);
CHECK_EQ(test.fUlt, 0);
CHECK_EQ(test.fOle, 1);
CHECK_EQ(test.fUle, 1);
CHECK_EQ(test.dF, 0U);
CHECK_EQ(test.dUn, 0U);
CHECK_EQ(test.dEq, 1U);
CHECK_EQ(test.dUeq, 1U);
CHECK_EQ(test.dOlt, 0U);
CHECK_EQ(test.dUlt, 0U);
CHECK_EQ(test.dOle, 1U);
CHECK_EQ(test.dUle, 1U);
CHECK_EQ(test.fF, 0U);
CHECK_EQ(test.fUn, 0U);
CHECK_EQ(test.fEq, 1U);
CHECK_EQ(test.fUeq, 1U);
CHECK_EQ(test.fOlt, 0U);
CHECK_EQ(test.fUlt, 0U);
CHECK_EQ(test.fOle, 1U);
CHECK_EQ(test.fUle, 1U);
test.dOp1 = std::numeric_limits<double>::quiet_NaN();
test.dOp2 = 0.0;
test.fOp1 = std::numeric_limits<float>::quiet_NaN();
test.fOp2 = 0.0;
(CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0));
CHECK_EQ(test.dF, 0);
CHECK_EQ(test.dUn, 1);
CHECK_EQ(test.dEq, 0);
CHECK_EQ(test.dUeq, 1);
CHECK_EQ(test.dOlt, 0);
CHECK_EQ(test.dUlt, 1);
CHECK_EQ(test.dOle, 0);
CHECK_EQ(test.dUle, 1);
CHECK_EQ(test.fF, 0);
CHECK_EQ(test.fUn, 1);
CHECK_EQ(test.fEq, 0);
CHECK_EQ(test.fUeq, 1);
CHECK_EQ(test.fOlt, 0);
CHECK_EQ(test.fUlt, 1);
CHECK_EQ(test.fOle, 0);
CHECK_EQ(test.fUle, 1);
CHECK_EQ(test.dF, 0U);
CHECK_EQ(test.dUn, 1U);
CHECK_EQ(test.dEq, 0U);
CHECK_EQ(test.dUeq, 1U);
CHECK_EQ(test.dOlt, 0U);
CHECK_EQ(test.dUlt, 1U);
CHECK_EQ(test.dOle, 0U);
CHECK_EQ(test.dUle, 1U);
CHECK_EQ(test.fF, 0U);
CHECK_EQ(test.fUn, 1U);
CHECK_EQ(test.fEq, 0U);
CHECK_EQ(test.fUeq, 1U);
CHECK_EQ(test.fOlt, 0U);
CHECK_EQ(test.fUlt, 1U);
CHECK_EQ(test.fOle, 0U);
CHECK_EQ(test.fUle, 1U);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment