mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Always perform cleanup for EXP.
This commit is contained in:
parent
f190caf538
commit
eb7978d631
@ -2069,7 +2069,9 @@ bool ExpressionCompiler::cleanupNeededForOp(Type::Category _type, Token::Value _
|
|||||||
{
|
{
|
||||||
if (Token::isCompareOp(_op) || Token::isShiftOp(_op))
|
if (Token::isCompareOp(_op) || Token::isShiftOp(_op))
|
||||||
return true;
|
return true;
|
||||||
else if (_type == Type::Category::Integer && (_op == Token::Div || _op == Token::Mod))
|
else if (_type == Type::Category::Integer && (_op == Token::Div || _op == Token::Mod || _op == Token::Exp))
|
||||||
|
// We need cleanup for EXP because 0**0 == 1, but 0**0x100 == 0
|
||||||
|
// It would suffice to clean the exponent, though.
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user