diff --git a/libsmtutil/CVC4Interface.cpp b/libsmtutil/CVC4Interface.cpp index c335b18d1..ff356c025 100644 --- a/libsmtutil/CVC4Interface.cpp +++ b/libsmtutil/CVC4Interface.cpp @@ -292,7 +292,7 @@ CVC4::Expr CVC4Interface::toCVC4Expr(Expression const& _expr) smtAssert(false); // FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) - throw exception(); + util::unreachable(); } CVC4::Type CVC4Interface::cvc4Sort(Sort const& _sort) diff --git a/libsmtutil/Z3Interface.cpp b/libsmtutil/Z3Interface.cpp index 74767d86c..4abeffa16 100644 --- a/libsmtutil/Z3Interface.cpp +++ b/libsmtutil/Z3Interface.cpp @@ -274,7 +274,7 @@ z3::expr Z3Interface::toZ3Expr(Expression const& _expr) smtAssert(false); // FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) - throw exception(); + util::unreachable(); } Expression Z3Interface::fromZ3Expr(z3::expr const& _expr) @@ -385,7 +385,7 @@ Expression Z3Interface::fromZ3Expr(z3::expr const& _expr) smtAssert(false); // FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) - throw exception(); + util::unreachable(); } z3::sort Z3Interface::z3Sort(Sort const& _sort) diff --git a/libsolidity/ast/ASTJsonImporter.cpp b/libsolidity/ast/ASTJsonImporter.cpp index 859a93350..4fcea9aff 100644 --- a/libsolidity/ast/ASTJsonImporter.cpp +++ b/libsolidity/ast/ASTJsonImporter.cpp @@ -231,7 +231,7 @@ ASTPointer ASTJsonImporter::convertJsonToASTNode(Json::Value const& _js astAssert(false, "Unknown type of ASTNode: " + nodeType); // FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) - throw exception(); + util::unreachable(); } // ============ functions to instantiate the AST-Nodes from Json-Nodes ============== @@ -1078,7 +1078,7 @@ Visibility ASTJsonImporter::visibility(Json::Value const& _node) astAssert(false, "Unknown visibility declaration"); // FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) - throw exception(); + util::unreachable(); } VariableDeclaration::Location ASTJsonImporter::location(Json::Value const& _node) @@ -1100,7 +1100,7 @@ VariableDeclaration::Location ASTJsonImporter::location(Json::Value const& _node astAssert(false, "Unknown location declaration"); // FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) - throw exception(); + util::unreachable(); } Literal::SubDenomination ASTJsonImporter::subdenomination(Json::Value const& _node) @@ -1136,7 +1136,7 @@ Literal::SubDenomination ASTJsonImporter::subdenomination(Json::Value const& _no astAssert(false, "Unknown subdenomination"); // FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) - throw exception(); + util::unreachable(); } StateMutability ASTJsonImporter::stateMutability(Json::Value const& _node) @@ -1156,7 +1156,7 @@ StateMutability ASTJsonImporter::stateMutability(Json::Value const& _node) astAssert(false, "Unknown stateMutability"); // FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) - throw exception(); + util::unreachable(); } } diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index 0299ff092..554ebf75c 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -1655,7 +1655,7 @@ ASTPointer Parser::parseSimpleStatement(ASTPointer const& } // FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) - throw exception(); + util::unreachable(); } bool Parser::IndexAccessedPath::empty() const diff --git a/libyul/AsmJsonImporter.cpp b/libyul/AsmJsonImporter.cpp index 1f108145f..0a88cacf8 100644 --- a/libyul/AsmJsonImporter.cpp +++ b/libyul/AsmJsonImporter.cpp @@ -112,7 +112,7 @@ Statement AsmJsonImporter::createStatement(Json::Value const& _node) yulAssert(false, "Invalid nodeType as statement"); // FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) - throw exception(); + util::unreachable(); } Expression AsmJsonImporter::createExpression(Json::Value const& _node) @@ -134,7 +134,7 @@ Expression AsmJsonImporter::createExpression(Json::Value const& _node) yulAssert(false, "Invalid nodeType as expression"); // FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) - throw exception(); + util::unreachable(); } vector AsmJsonImporter::createExpressionVector(Json::Value const& _array) diff --git a/tools/yulPhaser/Phaser.cpp b/tools/yulPhaser/Phaser.cpp index c49d9a2d8..213e6f15b 100644 --- a/tools/yulPhaser/Phaser.cpp +++ b/tools/yulPhaser/Phaser.cpp @@ -278,7 +278,7 @@ unique_ptr FitnessMetricFactory::build( } // FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) - throw exception(); + util::unreachable(); } PopulationFactory::Options PopulationFactory::Options::fromCommandLine(po::variables_map const& _arguments)