diff options
author | chriseth <chris@ethereum.org> | 2017-03-10 17:08:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-10 17:08:55 +0800 |
commit | f1dd79c7433a6c78e879a0b597b0585921838f1e (patch) | |
tree | 2e1993d96f58ef8aed5ba02bf8a2b850699df90b /libsolidity | |
parent | b22369d59007f0e68374c861fb7551cf6fbfaa99 (diff) | |
parent | fe8d09a3c117b6e521638450e5ff14dc0d658b70 (diff) | |
download | dexon-solidity-f1dd79c7433a6c78e879a0b597b0585921838f1e.tar dexon-solidity-f1dd79c7433a6c78e879a0b597b0585921838f1e.tar.gz dexon-solidity-f1dd79c7433a6c78e879a0b597b0585921838f1e.tar.bz2 dexon-solidity-f1dd79c7433a6c78e879a0b597b0585921838f1e.tar.lz dexon-solidity-f1dd79c7433a6c78e879a0b597b0585921838f1e.tar.xz dexon-solidity-f1dd79c7433a6c78e879a0b597b0585921838f1e.tar.zst dexon-solidity-f1dd79c7433a6c78e879a0b597b0585921838f1e.zip |
Merge pull request #1766 from ryepdx/develop-gcc6.3.0-boost1.63.0
Updates for gcc 6.3.0 and Boost 1.63.0
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/analysis/SemVerHandler.h | 3 | ||||
-rw-r--r-- | libsolidity/ast/Types.cpp | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/libsolidity/analysis/SemVerHandler.h b/libsolidity/analysis/SemVerHandler.h index fae0a764..76b70c5b 100644 --- a/libsolidity/analysis/SemVerHandler.h +++ b/libsolidity/analysis/SemVerHandler.h @@ -34,6 +34,9 @@ class SemVerError: dev::Exception { }; +#undef major +#undef minor + struct SemVerVersion { unsigned numbers[3]; diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 7f267cc9..d2793b6d 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -650,12 +650,12 @@ bool RationalNumberType::isImplicitlyConvertibleTo(Type const& _convertTo) const if (_convertTo.category() == Category::Integer) { auto targetType = dynamic_cast<IntegerType const*>(&_convertTo); - if (m_value == 0) + if (m_value == rational(0)) return true; if (isFractional()) return false; int forSignBit = (targetType->isSigned() ? 1 : 0); - if (m_value > 0) + if (m_value > rational(0)) { if (m_value.numerator() <= (u256(-1) >> (256 - targetType->numBits() + forSignBit))) return true; @@ -776,13 +776,13 @@ TypePointer RationalNumberType::binaryOperatorResult(Token::Value _operator, Typ value = m_value * other.m_value; break; case Token::Div: - if (other.m_value == 0) + if (other.m_value == rational(0)) return TypePointer(); else value = m_value / other.m_value; break; case Token::Mod: - if (other.m_value == 0) + if (other.m_value == rational(0)) return TypePointer(); else if (fractional) { @@ -887,7 +887,7 @@ u256 RationalNumberType::literalValue(Literal const*) const solAssert(shiftedValue <= u256(-1), "Integer constant too large."); solAssert(shiftedValue >= -(bigint(1) << 255), "Number constant too small."); - if (m_value >= 0) + if (m_value >= rational(0)) value = u256(shiftedValue); else value = s2u(s256(shiftedValue)); |