
warning C4702: unreachable code in Visual Studio .NET 2002, even with /EHac
Hi A,
Quote:
> 1) since the compiler thinks the exceptions won't be thrown, is the
handling
> code being compiled out?
The warning means the compiler thinks the EH handler code is unnecessary and
will remove it if optimizations are used.
Quote:
> 2) is this warning bogus or not? that is, can I safely disable this
warning
> for this call? I don't want to disable it globally as this warning has
> already found some real bugs for us.
The warning is not bogus, if you are seeing it then the compiler will not
emit code to handle the exception. To see for yourself, check the .cod file
(compile with /FAsc.) For some reason, in your program, the compiler
believes that CDaoRecordset::Update will not throw an exception. I have
attempted to reproduce this behavior, but cannot. We will need a more
complete example before we can discover the problem.
--
Eric Christoffersen
Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.