mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #13006 from ethereum/initializationOrderFix
Fix asorted compilation issues with GCC 12.
This commit is contained in:
commit
1d7b4704bb
@ -96,8 +96,8 @@ public:
|
|||||||
void clear() { m_errorReporter.clear(); }
|
void clear() { m_errorReporter.clear(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ErrorReporter m_errorReporter;
|
|
||||||
ErrorList m_uniqueErrors;
|
ErrorList m_uniqueErrors;
|
||||||
|
ErrorReporter m_errorReporter;
|
||||||
std::map<std::pair<ErrorId, SourceLocation>, std::string> m_seenErrors;
|
std::map<std::pair<ErrorId, SourceLocation>, std::string> m_seenErrors;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,7 +29,15 @@
|
|||||||
#error "Unsupported Boost version. At least 1.65 required."
|
#error "Unsupported Boost version. At least 1.65 required."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// TODO: do this only conditionally as soon as a boost version with gcc 12 support is released.
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||||
|
#endif
|
||||||
#include <boost/multiprecision/cpp_int.hpp>
|
#include <boost/multiprecision/cpp_int.hpp>
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
|
@ -94,7 +94,10 @@ public:
|
|||||||
else if (value == 21)
|
else if (value == 21)
|
||||||
return "true";
|
return "true";
|
||||||
else
|
else
|
||||||
|
{
|
||||||
assertThrow(false, CBORException, "Unsupported simple value (not a boolean).");
|
assertThrow(false, CBORException, "Unsupported simple value (not a boolean).");
|
||||||
|
return ""; // unreachable, but prevents compiler warning.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
assertThrow(false, CBORException, "Unsupported value type.");
|
assertThrow(false, CBORException, "Unsupported value type.");
|
||||||
|
Loading…
Reference in New Issue
Block a user