Warning C4702: unreachable code
Submitted by sur..@..nam.cz
Assigned to Nobody
Link to original bugzilla bug (#909)
Version: 3.2
Operating system: Windows
Description
Macro EIGEN_MAKE_ALIGNED_OPERATOR_NEW generates Warning C4702: unreachable code when building on VS2012 toolkit.
My understanding of this:
Part of that macro is another macro EIGEN_MAKE_ALIGNED_OPERATOR_NEW_NOTHROW which is unfolded to:
void* operator new(size_t size, const std::nothrow_t&) throw()
{
try { return Eigen::internal::conditional_aligned_malloc<NeedsToAlign>(size); }
catch (...) { return 0; }
return 0;
}
The last return 0; seems to be the culprit. When I remove it, then VS2012 is happy and no warning appears.
Edited by Eigen Bugzilla