Re-enable unreachable code checks.
VTK-m is disabling unreachable code warnings on MSVC, since this pattern causes some warnings that we can safely ignore:
struct A
{
int foo() { return myInt; }
int myInt;
};
struct B
{
int foo() { throw ...; }
};
template <typename Fooer>
struct DoFoo
{
void bar()
{
Fooer fooer;
int foo = fooer.foo();
std::cerr << foo << "\n"; // unreachable when Fooer is B
}
};
template class DoFoo<A>; // ok
template class DoFoo<B>; // emits unreachable code warning at indicated line.
This is popping up with read-only storage types, e.g. in StorageImplicit::PrepareForOutput
, which just throws.
Rather than disable this useful warning, we should eventually look into other ways to fix the issue.