Best way to eliminate warnings
Created by: jhux2
@trilinos/xpetra Xpetra has a number of these types of warnings:
Xpetra_EpetraIntVector.hpp(385): warning: statement is unreachable
385 int dot(const Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &a) const { XPETRA_MONITOR("EpetraIntVectorT::dot"); TEUCHOS_TEST_FOR_EXCEPTION(-1, Xpetra::Exceptions::NotImplemented, "TODO"); return -1; }
It would be great to keep the exception and eliminate the warning, without removing the return value, which would generate another type of warning. Is this possible, short of implementing the method?
Pragmas are not an option it seems, as the option --Wunreachable-code
has been a no-op in g++ for a long time; see this link.