diff --git a/src/language/ast/ASTBuilder.cpp b/src/language/ast/ASTBuilder.cpp index 252e0d44e4834c8808d61cf781cbf553acb24563..476c30201ffd43f1102efaa9c9430a5283cc8c89 100644 --- a/src/language/ast/ASTBuilder.cpp +++ b/src/language/ast/ASTBuilder.cpp @@ -54,7 +54,7 @@ struct ASTBuilder::rearrange_pre_unary_op : TAO_PEGTL_NAMESPACE::parse_tree::app { template <typename... States> static void - transform(std::unique_ptr<ASTNode>& n, States&&... st) + transform(std::unique_ptr<ASTNode>& n, States&&...) { if (n->children.size() == 1) { n = std::move(n->children.back()); diff --git a/src/language/node_processor/FunctionProcessor.hpp b/src/language/node_processor/FunctionProcessor.hpp index 86742e170992cd50cab13ea6c7495f87447a81c1..bc8c3c0bdd6d9cd5a7e1b8fb91f7e21e3c45f8a8 100644 --- a/src/language/node_processor/FunctionProcessor.hpp +++ b/src/language/node_processor/FunctionProcessor.hpp @@ -26,7 +26,8 @@ class FunctionExpressionProcessor final : public INodeProcessor } else if constexpr (std::is_same_v<ExpressionValueType, ZeroType>) { return ReturnType{ZeroType::zero}; } else if constexpr (std::is_convertible_v<ExpressionValueType, ReturnType>) { - const ExpressionValueType& v = std::get<ExpressionValueType>(m_function_expression.execute(exec_policy)); + auto expression_value = m_function_expression.execute(exec_policy); + const ExpressionValueType& v = std::get<ExpressionValueType>(expression_value); if constexpr (std::is_same_v<ReturnType, uint64_t> and std::is_same_v<ExpressionValueType, int64_t>) { if (v < 0) { throw std::domain_error("trying to convert negative value (" + stringify(v) + ")");