aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm/AsmAnalysis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/inlineasm/AsmAnalysis.cpp')
-rw-r--r--libsolidity/inlineasm/AsmAnalysis.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/libsolidity/inlineasm/AsmAnalysis.cpp b/libsolidity/inlineasm/AsmAnalysis.cpp
index 7bcbde91..630e0abf 100644
--- a/libsolidity/inlineasm/AsmAnalysis.cpp
+++ b/libsolidity/inlineasm/AsmAnalysis.cpp
@@ -447,17 +447,25 @@ void AsmAnalyzer::expectValidType(string const& type, SourceLocation const& _loc
void AsmAnalyzer::warnOnFutureInstruction(solidity::Instruction _instr, SourceLocation const& _location)
{
+ string instr;
switch (_instr)
{
+ case solidity::Instruction::CREATE2:
+ instr = "create2";
+ break;
case solidity::Instruction::RETURNDATASIZE:
+ instr = "returndatasize";
+ break;
case solidity::Instruction::RETURNDATACOPY:
- m_errorReporter.warning(
- _location,
- "The RETURNDATASIZE/RETURNDATACOPY instructions are only available after "
- "the Metropolis hard fork. Before that they act as an invalid instruction."
- );
+ instr = "returndatacopy";
break;
default:
break;
}
+ if (!instr.empty())
+ m_errorReporter.warning(
+ _location,
+ "The \"" + instr + "\" instruction is only available after " +
+ "the Metropolis hard fork. Before that it acts as an invalid instruction."
+ );
}