Boost logo

Boost :

From: Carl Daniel (cpdaniel_at_[hidden])
Date: 2003-09-21 21:14:17

David Abrahams wrote:
> "carlos pizano" <carlospizano_at_[hidden]> writes:
>>> FWIW, when David pointed me to his article (thanks again David)
>>> I came to same the same conclusion myself (that is, that /EHa
>>> is _not_ required for this technique).
>> a) What article?
> The very link I quoted in my first reply to you. Once again:
> Did you read it?

Yes, David is quite correct (as usual) - the technique described in this
article does not rely on /EHa. Whether the compiler does or does not
optimize out any exception frames is not relevant: the outcome is the same
either way. If there are no exception frames (or all frames were optimized
out), then the SEH exception frame that surrounds main() of all VC++
programs will catch the exception and invoke the system debugger. If a C++
exception frame ever "sees" the SEH, the throw from within the translator
will also result in an invocation of the system debugger (or, more
correctly, call to to UnhandleExceptionFilter, which, in turn, invokes the
system debugger).

For details on exactly how exception handling works under Visual C++ and
Win32, see this article by Matt Pietrek.


Boost list run by bdawes at, gregod at, cpdaniel at, john at