Merge pull request #3961 from akva2/use_pragma_suppress_diagnostic

changed: use gcc pragma's to suppress strict-aliasing warning
This commit is contained in:
Bård Skaflestad 2022-06-27 16:19:11 +02:00 committed by GitHub
commit 28f08e5e68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -289,7 +289,10 @@ testPrecRepeating(const Opm::PropertyTree& prm, const std::string& matrix_filena
throw std::runtime_error("Could not read matrix file");
}
using M = Dune::BCRSMatrix<Dune::FieldMatrix<double, bz, bz>>;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
readMatrixMarket(reinterpret_cast<M&>(matrix), mfile); // Hack to avoid hassle
#pragma GCC diagnostic pop
}
Vector rhs;
{