From 8f1668ffb8ca21fa8bc95674bc366a6069a586d8 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Wed, 1 Feb 2023 20:00:20 +0100 Subject: [PATCH 1/2] libsolutil: Add missing include This helps suppressing the following message during compilation: ``` /builddir/build/BUILD/solidity-0.8.18/libsolutil/Common.h:55:27: error: 'uint8_t' was not declared in this scope 55 | using bytes = std::vector; | ^~~~~~~ /builddir/build/BUILD/solidity-0.8.18/libsolutil/Common.h:49:1: note: 'uint8_t' is defined in header ''; did you forget to '#include '? 48 | #include +++ |+#include 49 | #include ``` Signed-off-by: Peter Lemenkov --- libsolutil/Common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsolutil/Common.h b/libsolutil/Common.h index eea9dacd5..c908c13ae 100644 --- a/libsolutil/Common.h +++ b/libsolutil/Common.h @@ -42,11 +42,12 @@ #include +#include +#include #include +#include #include #include -#include -#include namespace solidity { From 6a6bf303b5ef7a000e56d4b0e87d882e7287e1ea Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Wed, 1 Feb 2023 20:00:20 +0100 Subject: [PATCH 2/2] libsolutil: Add missing include This one is more obscure. It helps suppressing the following error while compiling: ``` /builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:33:6: error: elaborated-type-specifier for a scoped enum must not use the 'class' keyword [-Werror] 33 | enum class Instruction: uint8_t; | ~~~~ ^~~~~ | ----- /builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:33:23: error: found ':' in nested-name-specifier, expected '::' 33 | enum class Instruction: uint8_t; | ^ | :: /builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:33:12: error: 'Instruction' has not been declared 33 | enum class Instruction: uint8_t; | ^~~~~~~~~~~ /builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:101:24: error: 'solidity::evmasm::Instruction' has not been declared 101 | bool hasOpcode(evmasm::Instruction _opcode) const; | ^~~~~~ /builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.cpp:29:6: error: no declaration matches 'bool solidity::langutil::EVMVersion::hasOpcode(solidity::evmasm::Instruction) const' 29 | bool EVMVersion::hasOpcode(Instruction _opcode) const | ^~~~~~~~~~ /builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:101:14: note: candidate is: 'bool solidity::langutil::EVMVersion::hasOpcode(int) const' 101 | bool hasOpcode(evmasm::Instruction _opcode) const; | ^~~~~~~~~ /builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:43:7: note: 'class solidity::langutil::EVMVersion' defined here 43 | class EVMVersion: | ^~~~~~~~~~ cc1plus: all warnings being treated as errors ``` Signed-off-by: Peter Lemenkov --- liblangutil/EVMVersion.h | 1 + 1 file changed, 1 insertion(+) diff --git a/liblangutil/EVMVersion.h b/liblangutil/EVMVersion.h index aa23ea6ee..22f85c8af 100644 --- a/liblangutil/EVMVersion.h +++ b/liblangutil/EVMVersion.h @@ -21,6 +21,7 @@ #pragma once +#include #include #include