Hi
The project is an ATL Server project. I have now discovered that the
warnings occur only in the debug mode - so the compiler should not be
removing any code.
The switches used are:
/Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS"
/D "_AFXDLL" /FD /EHsc /MDd /GR /Yu"stdafx.h" /Fp".\Debug/ProjectName.pch"
/Fo".\Debug/" /Fd".\Debug/" /W4 /nologo /c /ZI
The code is along these lines:
{
AFX_MANAGE_STATE(AfxGetAppModuleState())
try
{
m_dMemberSlope = newVal; //or some such simple assignments
}
catch( const _com_error& e )
{
ATLTRACE( _T("Error in line %d of %s: %s\n"), __LINE__, __FILE__,
e.ErrorMessage() );
ASSERT( false );
return e.Error();
}
catch( ... )
{
ATLTRACE( _T("Unknown error in line %d of %s\n"), __LINE__, __FILE__ );
ASSERT( false );
return E_FAIL;
}
return S_OK;
}
Thanks.
SS
"Carl Daniel [VC++ MVP]" <cp******@nospam.mvps.org> wrote in message
news:eS**************@TK2MSFTNGP12.phx.gbl...
SteadySteps wrote: Hi
I migrated a project which compiles correctly on VC 6.0 to VS 2002.
However now all I get several warning that all the statements within
catch blocks are "unreachable code". How can I correct this ? C++
exceptions are enabled ( /EHsc ).
Can you narrow down a simple repro case that you can post here that
produces the warnings you're seeing, and the command-line options you're using to
compile it?
-cd