Apply a better way to annotate unreachability to the C++ compiler.

This commit is contained in:
Christian Parpart 2022-06-07 15:43:14 +02:00
parent 927da20ce4
commit 4ae43884d0
6 changed files with 12 additions and 12 deletions

View File

@ -292,7 +292,7 @@ CVC4::Expr CVC4Interface::toCVC4Expr(Expression const& _expr)
smtAssert(false); smtAssert(false);
// FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) // 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) CVC4::Type CVC4Interface::cvc4Sort(Sort const& _sort)

View File

@ -274,7 +274,7 @@ z3::expr Z3Interface::toZ3Expr(Expression const& _expr)
smtAssert(false); smtAssert(false);
// FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) // 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) Expression Z3Interface::fromZ3Expr(z3::expr const& _expr)
@ -385,7 +385,7 @@ Expression Z3Interface::fromZ3Expr(z3::expr const& _expr)
smtAssert(false); smtAssert(false);
// FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) // 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) z3::sort Z3Interface::z3Sort(Sort const& _sort)

View File

@ -231,7 +231,7 @@ ASTPointer<ASTNode> ASTJsonImporter::convertJsonToASTNode(Json::Value const& _js
astAssert(false, "Unknown type of ASTNode: " + nodeType); 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) // 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 ============== // ============ 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"); astAssert(false, "Unknown visibility declaration");
// FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) // 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) 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"); astAssert(false, "Unknown location declaration");
// FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) // 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) Literal::SubDenomination ASTJsonImporter::subdenomination(Json::Value const& _node)
@ -1136,7 +1136,7 @@ Literal::SubDenomination ASTJsonImporter::subdenomination(Json::Value const& _no
astAssert(false, "Unknown subdenomination"); astAssert(false, "Unknown subdenomination");
// FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) // 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) StateMutability ASTJsonImporter::stateMutability(Json::Value const& _node)
@ -1156,7 +1156,7 @@ StateMutability ASTJsonImporter::stateMutability(Json::Value const& _node)
astAssert(false, "Unknown stateMutability"); astAssert(false, "Unknown stateMutability");
// FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) // FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794)
throw exception(); util::unreachable();
} }
} }

View File

@ -1655,7 +1655,7 @@ ASTPointer<Statement> Parser::parseSimpleStatement(ASTPointer<ASTString> const&
} }
// FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) // 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 bool Parser::IndexAccessedPath::empty() const

View File

@ -112,7 +112,7 @@ Statement AsmJsonImporter::createStatement(Json::Value const& _node)
yulAssert(false, "Invalid nodeType as statement"); yulAssert(false, "Invalid nodeType as statement");
// FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) // 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) Expression AsmJsonImporter::createExpression(Json::Value const& _node)
@ -134,7 +134,7 @@ Expression AsmJsonImporter::createExpression(Json::Value const& _node)
yulAssert(false, "Invalid nodeType as expression"); yulAssert(false, "Invalid nodeType as expression");
// FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) // FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794)
throw exception(); util::unreachable();
} }
vector<Expression> AsmJsonImporter::createExpressionVector(Json::Value const& _array) vector<Expression> AsmJsonImporter::createExpressionVector(Json::Value const& _array)

View File

@ -278,7 +278,7 @@ unique_ptr<FitnessMetric> FitnessMetricFactory::build(
} }
// FIXME: Workaround for spurious GCC 12.1 warning (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105794) // 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) PopulationFactory::Options PopulationFactory::Options::fromCommandLine(po::variables_map const& _arguments)