diff --git a/src/storm/settings/ArgumentBase.cpp b/src/storm/settings/ArgumentBase.cpp index 97e3b2c00..cc435ac55 100644 --- a/src/storm/settings/ArgumentBase.cpp +++ b/src/storm/settings/ArgumentBase.cpp @@ -56,11 +56,9 @@ namespace storm { } // Explicitly instantiate the templates. - template std::string ArgumentBase::convertFromString(std::string const& valueAsString, bool& conversionSuccessful); template int_fast64_t ArgumentBase::convertFromString(std::string const& valueAsString, bool& conversionSuccessful); template uint_fast64_t ArgumentBase::convertFromString(std::string const& valueAsString, bool& conversionSuccessful); template double ArgumentBase::convertFromString(std::string const& valueAsString, bool& conversionSuccessful); - template bool ArgumentBase::convertFromString(std::string const& valueAsString, bool& conversionSuccessful); template std::string ArgumentBase::convertToString(std::string const& value); template std::string ArgumentBase::convertToString(int_fast64_t const& value); diff --git a/src/storm/settings/ArgumentTypeInferationHelper.cpp b/src/storm/settings/ArgumentTypeInferationHelper.cpp index 1f1144bcf..598e28ce5 100644 --- a/src/storm/settings/ArgumentTypeInferationHelper.cpp +++ b/src/storm/settings/ArgumentTypeInferationHelper.cpp @@ -89,40 +89,29 @@ namespace storm { } // Explicitly instantiate the templates. - template ArgumentType inferToEnumType(); - template ArgumentType inferToEnumType(); - template ArgumentType inferToEnumType(); - template ArgumentType inferToEnumType(); - template ArgumentType inferToEnumType(); - - template std::string const& inferToString(ArgumentType const& argumentType, std::string const& value); template std::string const& inferToString(ArgumentType const& argumentType, int_fast64_t const& value); template std::string const& inferToString(ArgumentType const& argumentType, uint_fast64_t const& value); template std::string const& inferToString(ArgumentType const& argumentType, double const& value); template std::string const& inferToString(ArgumentType const& argumentType, bool const& value); template int_fast64_t inferToInteger(ArgumentType const& argumentType, std::string const& value); - template int_fast64_t inferToInteger(ArgumentType const& argumentType, int_fast64_t const& value); template int_fast64_t inferToInteger(ArgumentType const& argumentType, uint_fast64_t const& value); template int_fast64_t inferToInteger(ArgumentType const& argumentType, double const& value); template int_fast64_t inferToInteger(ArgumentType const& argumentType, bool const& value); template uint_fast64_t inferToUnsignedInteger(ArgumentType const& argumentType, std::string const& value); template uint_fast64_t inferToUnsignedInteger(ArgumentType const& argumentType, int_fast64_t const& value); - template uint_fast64_t inferToUnsignedInteger(ArgumentType const& argumentType, uint_fast64_t const& value); template uint_fast64_t inferToUnsignedInteger(ArgumentType const& argumentType, double const& value); template uint_fast64_t inferToUnsignedInteger(ArgumentType const& argumentType, bool const& value); template double inferToDouble(ArgumentType const& argumentType, std::string const& value); template double inferToDouble(ArgumentType const& argumentType, int_fast64_t const& value); template double inferToDouble(ArgumentType const& argumentType, uint_fast64_t const& value); - template double inferToDouble(ArgumentType const& argumentType, double const& value); template double inferToDouble(ArgumentType const& argumentType, bool const& value); template bool inferToBoolean(ArgumentType const& argumentType, std::string const& value); template bool inferToBoolean(ArgumentType const& argumentType, int_fast64_t const& value); template bool inferToBoolean(ArgumentType const& argumentType, uint_fast64_t const& value); template bool inferToBoolean(ArgumentType const& argumentType, double const& value); - template bool inferToBoolean(ArgumentType const& argumentType, bool const& value); } } diff --git a/src/storm/solver/EigenLinearEquationSolver.cpp b/src/storm/solver/EigenLinearEquationSolver.cpp index 16b0faf42..353c71f8e 100644 --- a/src/storm/solver/EigenLinearEquationSolver.cpp +++ b/src/storm/solver/EigenLinearEquationSolver.cpp @@ -403,9 +403,6 @@ namespace storm { template class EigenLinearEquationSolverFactory; #ifdef STORM_HAVE_CARL - template class EigenLinearEquationSolverSettings; - template class EigenLinearEquationSolverSettings; - template class EigenLinearEquationSolver; template class EigenLinearEquationSolver; diff --git a/src/storm/solver/LinearEquationSolver.cpp b/src/storm/solver/LinearEquationSolver.cpp index e5655c07d..2830d7a5a 100644 --- a/src/storm/solver/LinearEquationSolver.cpp +++ b/src/storm/solver/LinearEquationSolver.cpp @@ -241,9 +241,6 @@ namespace storm { template class LinearEquationSolverFactory; template class LinearEquationSolverFactory; - - template class GeneralLinearEquationSolverFactory; - template class GeneralLinearEquationSolverFactory; #endif } diff --git a/src/storm/storage/dd/DdManager.cpp b/src/storm/storage/dd/DdManager.cpp index b711f5f92..c08d572c0 100644 --- a/src/storm/storage/dd/DdManager.cpp +++ b/src/storm/storage/dd/DdManager.cpp @@ -173,10 +173,19 @@ namespace storm { return result; } +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Winfinite-recursion" +#endif + template Bdd DdManager::getCube(storm::expressions::Variable const& variable) const { return getCube({variable}); } + +#if defined(__clang__) +#pragma clang diagnostic pop +#endif template Bdd DdManager::getCube(std::set const& variables) const { diff --git a/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp b/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp index 0bfc8c1ad..d8c31bdcb 100644 --- a/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp +++ b/src/storm/storage/dd/cudd/InternalCuddDdManager.cpp @@ -179,6 +179,5 @@ namespace storm { template InternalAdd InternalDdManager::getConstant(double const& value) const; template InternalAdd InternalDdManager::getConstant(uint_fast64_t const& value) const; - template InternalAdd InternalDdManager::getConstant(storm::RationalNumber const& value) const; } } diff --git a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp index 29f9a3208..a2ded9452 100644 --- a/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp +++ b/src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp @@ -19,6 +19,12 @@ namespace storm { namespace dd { #ifndef NDEBUG +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wzero-length-array" +#pragma clang diagnostic ignored "-Wc99-extensions" +#endif + VOID_TASK_0(gc_start) { STORM_LOG_TRACE("Starting sylvan garbage collection..."); } @@ -26,6 +32,11 @@ namespace storm { VOID_TASK_0(gc_end) { STORM_LOG_TRACE("Sylvan garbage collection done."); } + +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + #endif uint_fast64_t InternalDdManager::numberOfInstances = 0; @@ -237,24 +248,6 @@ namespace storm { return nextFreeVariableIndex; } - template InternalAdd InternalDdManager::getAddOne() const; - template InternalAdd InternalDdManager::getAddOne() const; - - template InternalAdd InternalDdManager::getAddOne() const; - -#ifdef STORM_HAVE_CARL - template InternalAdd InternalDdManager::getAddOne() const; -#endif - - template InternalAdd InternalDdManager::getAddZero() const; - template InternalAdd InternalDdManager::getAddZero() const; - - template InternalAdd InternalDdManager::getAddZero() const; - -#ifdef STORM_HAVE_CARL - template InternalAdd InternalDdManager::getAddZero() const; -#endif - template InternalAdd InternalDdManager::getAddUndefined() const; template InternalAdd InternalDdManager::getAddUndefined() const; @@ -263,14 +256,5 @@ namespace storm { #ifdef STORM_HAVE_CARL template InternalAdd InternalDdManager::getAddUndefined() const; #endif - - template InternalAdd InternalDdManager::getConstant(double const& value) const; - template InternalAdd InternalDdManager::getConstant(uint_fast64_t const& value) const; - - template InternalAdd InternalDdManager::getConstant(storm::RationalNumber const& value) const; - -#ifdef STORM_HAVE_CARL - template InternalAdd InternalDdManager::getConstant(storm::RationalFunction const& value) const; -#endif } } diff --git a/src/storm/storage/jani/Automaton.cpp b/src/storm/storage/jani/Automaton.cpp index e3ec908c1..920854628 100644 --- a/src/storm/storage/jani/Automaton.cpp +++ b/src/storm/storage/jani/Automaton.cpp @@ -543,6 +543,9 @@ namespace storm { for (auto const& edge : edges) { outStream << "\t" << name << "_e" << edgeIndex << "[ label=\"\" , shape=circle, width=.2, style=filled, fillcolor=\"black\"];" << std::endl; ++edgeIndex; + + // Silencing unused variable warning. + (void)edge; } // Connect edges diff --git a/src/storm/utility/ConstantsComparator.cpp b/src/storm/utility/ConstantsComparator.cpp index bbac60a50..913c79f2d 100644 --- a/src/storm/utility/ConstantsComparator.cpp +++ b/src/storm/utility/ConstantsComparator.cpp @@ -105,8 +105,6 @@ namespace storm { } // Explicit instantiations. - template class ConstantsComparator; - template class ConstantsComparator; template class ConstantsComparator; template class ConstantsComparator; diff --git a/src/storm/utility/constants.cpp b/src/storm/utility/constants.cpp index 77665f6e5..fac7bea78 100644 --- a/src/storm/utility/constants.cpp +++ b/src/storm/utility/constants.cpp @@ -868,7 +868,6 @@ namespace storm { template bool isZero(int const& value); template bool isConstant(int const& value); template bool isInfinity(int const& value); - template bool isInteger(int const& number); // uint32_t template uint32_t one(); @@ -878,7 +877,6 @@ namespace storm { template bool isZero(uint32_t const& value); template bool isConstant(uint32_t const& value); template bool isInfinity(uint32_t const& value); - template bool isInteger(uint32_t const& number); // storm::storage::sparse::state_type template storm::storage::sparse::state_type one(); @@ -888,11 +886,8 @@ namespace storm { template bool isZero(storm::storage::sparse::state_type const& value); template bool isConstant(storm::storage::sparse::state_type const& value); template bool isInfinity(storm::storage::sparse::state_type const& value); - template bool isInteger(storm::storage::sparse::state_type const& number); // other instantiations - template double convertNumber(long long const&); - template storm::storage::sparse::state_type convertNumber(long long const& number); template unsigned long convertNumber(long const&); template double convertNumber(long const&); @@ -901,20 +896,11 @@ namespace storm { template storm::ClnRationalNumber one(); template NumberTraits::IntegerType one(); template storm::ClnRationalNumber zero(); - template storm::ClnRationalNumber infinity(); - template bool isOne(storm::ClnRationalNumber const& value); template bool isZero(NumberTraits::IntegerType const& value); - template bool isZero(storm::ClnRationalNumber const& value); template bool isConstant(storm::ClnRationalNumber const& value); template bool isInfinity(storm::ClnRationalNumber const& value); - template bool isInteger(storm::ClnRationalNumber const& number); - template double convertNumber(storm::ClnRationalNumber const& number); template storm::NumberTraits::IntegerType convertNumber(storm::NumberTraits::IntegerType const& number); - template storm::NumberTraits::IntegerType convertNumber(uint64_t const& number); - template uint_fast64_t convertNumber(storm::ClnRationalNumber const& number); - template storm::ClnRationalNumber convertNumber(double const& number); template storm::ClnRationalNumber convertNumber(storm::ClnRationalNumber const& number); - template ClnRationalNumber convertNumber(std::string const& number); template storm::ClnRationalNumber simplify(storm::ClnRationalNumber value); template storm::storage::MatrixEntry simplify(storm::storage::MatrixEntry matrixEntry); template storm::storage::MatrixEntry& simplify(storm::storage::MatrixEntry& matrixEntry); @@ -922,17 +908,10 @@ namespace storm { template std::pair minmax(std::map const&); template storm::ClnRationalNumber minimum(std::map const&); template storm::ClnRationalNumber maximum(std::map const&); - template std::pair minmax(std::vector const&); template storm::ClnRationalNumber minimum(std::vector const&); template storm::ClnRationalNumber maximum(std::vector const&); template storm::ClnRationalNumber max(storm::ClnRationalNumber const& first, storm::ClnRationalNumber const& second); template storm::ClnRationalNumber min(storm::ClnRationalNumber const& first, storm::ClnRationalNumber const& second); - template storm::ClnRationalNumber pow(storm::ClnRationalNumber const& value, uint_fast64_t exponent); - template storm::ClnRationalNumber sqrt(storm::ClnRationalNumber const& number); - template storm::ClnRationalNumber abs(storm::ClnRationalNumber const& number); - template storm::ClnRationalNumber floor(storm::ClnRationalNumber const& number); - template storm::ClnRationalNumber ceil(storm::ClnRationalNumber const& number); - template storm::ClnRationalNumber log(storm::ClnRationalNumber const& number); template std::string to_string(storm::ClnRationalNumber const& value); #endif @@ -941,74 +920,34 @@ namespace storm { template storm::GmpRationalNumber one(); template NumberTraits::IntegerType one(); template storm::GmpRationalNumber zero(); - template storm::GmpRationalNumber infinity(); - template bool isOne(storm::GmpRationalNumber const& value); - template bool isZero(storm::GmpRationalNumber const& value); template bool isZero(NumberTraits::IntegerType const& value); template bool isConstant(storm::GmpRationalNumber const& value); template bool isInfinity(storm::GmpRationalNumber const& value); - template bool isInteger(storm::GmpRationalNumber const& number); - template double convertNumber(storm::GmpRationalNumber const& number); - template uint_fast64_t convertNumber(storm::GmpRationalNumber const& number); template storm::NumberTraits::IntegerType convertNumber(storm::NumberTraits::IntegerType const& number); - template storm::NumberTraits::IntegerType convertNumber(uint64_t const& number); - template storm::GmpRationalNumber convertNumber(double const& number); template storm::GmpRationalNumber convertNumber(storm::GmpRationalNumber const& number); - template GmpRationalNumber convertNumber(std::string const& number); template storm::GmpRationalNumber simplify(storm::GmpRationalNumber value); template storm::storage::MatrixEntry simplify(storm::storage::MatrixEntry matrixEntry); template storm::storage::MatrixEntry& simplify(storm::storage::MatrixEntry& matrixEntry); template storm::storage::MatrixEntry&& simplify(storm::storage::MatrixEntry&& matrixEntry); - template std::pair minmax(std::map const&); template storm::GmpRationalNumber minimum(std::map const&); template storm::GmpRationalNumber maximum(std::map const&); - template std::pair minmax(std::vector const&); template storm::GmpRationalNumber minimum(std::vector const&); template storm::GmpRationalNumber maximum(std::vector const&); template storm::GmpRationalNumber max(storm::GmpRationalNumber const& first, storm::GmpRationalNumber const& second); template storm::GmpRationalNumber min(storm::GmpRationalNumber const& first, storm::GmpRationalNumber const& second); - template storm::GmpRationalNumber pow(storm::GmpRationalNumber const& value, uint_fast64_t exponent); - template storm::GmpRationalNumber sqrt(storm::GmpRationalNumber const& number); - template storm::GmpRationalNumber abs(storm::GmpRationalNumber const& number); - template storm::GmpRationalNumber floor(storm::GmpRationalNumber const& number); - template storm::GmpRationalNumber ceil(storm::GmpRationalNumber const& number); - template storm::GmpRationalNumber log(storm::GmpRationalNumber const& number); template std::string to_string(storm::GmpRationalNumber const& value); #endif #if defined(STORM_HAVE_CARL) && defined(STORM_HAVE_GMP) && defined(STORM_HAVE_CLN) - template storm::GmpRationalNumber convertNumber(storm::ClnRationalNumber const& number); - template storm::ClnRationalNumber convertNumber(storm::GmpRationalNumber const& number); #endif #ifdef STORM_HAVE_CARL // Instantiations for rational function. template RationalFunction one(); template RationalFunction zero(); - template storm::RationalFunction infinity(); - template bool isOne(RationalFunction const& value); - template bool isZero(RationalFunction const& value); - template bool isConstant(RationalFunction const& value); - template bool isInfinity(RationalFunction const& value); - template bool isInteger(RationalFunction const&); - template storm::RationalFunction convertNumber(storm::RationalFunction const& number); - template RationalFunctionCoefficient convertNumber(RationalFunction const& number); - template RationalFunction convertNumber(storm::RationalFunctionCoefficient const& number); - template RationalFunction convertNumber(storm::storage::sparse::state_type const& number); - template RationalFunction convertNumber(double const& number); - template RationalFunction simplify(RationalFunction value); - template RationalFunction& simplify(RationalFunction& value); - template RationalFunction&& simplify(RationalFunction&& value); template storm::storage::MatrixEntry simplify(storm::storage::MatrixEntry matrixEntry); template storm::storage::MatrixEntry& simplify(storm::storage::MatrixEntry& matrixEntry); template storm::storage::MatrixEntry&& simplify(storm::storage::MatrixEntry&& matrixEntry); - template std::pair minmax(std::map const&); - template storm::RationalFunction minimum(std::map const&); - template storm::RationalFunction maximum(std::map const&); - template std::pair minmax(std::vector const&); - template storm::RationalFunction minimum(std::vector const&); - template storm::RationalFunction maximum(std::vector const&); - template RationalFunction pow(RationalFunction const& value, uint_fast64_t exponent); // Instantiations for polynomials. template Polynomial one(); diff --git a/src/storm/utility/eigen.h b/src/storm/utility/eigen.h index adf93465c..11b406431 100644 --- a/src/storm/utility/eigen.h +++ b/src/storm/utility/eigen.h @@ -3,16 +3,23 @@ // Include this utility header so we can access utility function from Eigen. #include "storm/utility/constants.h" +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunknown-pragmas" - -// Finally include the parts of Eigen we need. +#elif defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wignored-attributes" #pragma GCC diagnostic ignored "-Wmisleading-indentation" #pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + +// Finally include the parts of Eigen we need. #include #include #include -#pragma GCC diagnostic pop + +#if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#endif diff --git a/src/storm/utility/gmm.h b/src/storm/utility/gmm.h index 9f047785b..7c376c0e5 100644 --- a/src/storm/utility/gmm.h +++ b/src/storm/utility/gmm.h @@ -1,20 +1,25 @@ #ifndef STORM_UTILITY_GMM_H_ #define STORM_UTILITY_GMM_H_ +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-variable" #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunknown-pragmas" - - +#elif defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wmisleading-indentation" +#endif #include "gmm/gmm_matrix.h" #include "gmm/gmm_iter_solvers.h" -#pragma GCC diagnostic pop + +#if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#endif #endif /* STORM_UTILITY_GMM_H_ */ diff --git a/src/storm/utility/stateelimination.cpp b/src/storm/utility/stateelimination.cpp index 70804fabb..d8e000616 100644 --- a/src/storm/utility/stateelimination.cpp +++ b/src/storm/utility/stateelimination.cpp @@ -210,7 +210,6 @@ namespace storm { template std::vector getDistanceBasedPriorities(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward, bool reverse); template std::vector getStateDistances(storm::storage::SparseMatrix const& transitionMatrix, storm::storage::SparseMatrix const& transitionMatrixTransposed, storm::storage::BitVector const& initialStates, std::vector const& oneStepProbabilities, bool forward); - template uint_fast64_t estimateComplexity(storm::RationalFunction const& value); template std::shared_ptr createStatePriorityQueue(boost::optional> const& distanceBasedStatePriorities, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities, storm::storage::BitVector const& states); template uint_fast64_t computeStatePenalty(storm::storage::sparse::state_type const& state, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities); template uint_fast64_t computeStatePenaltyRegularExpression(storm::storage::sparse::state_type const& state, storm::storage::FlexibleSparseMatrix const& transitionMatrix, storm::storage::FlexibleSparseMatrix const& backwardTransitions, std::vector const& oneStepProbabilities);