From: Holger Grund (yahoo_at_[hidden])
Date: 2003-09-21 20:45:10
I've finallly managed to get my _whole_ post through the NNTP
interface. It seems that a line with only a dot in it makes the
interface stop processing the message - d'oh
> But is not a MS compiler issue. It works as advertised if you follow
> their recommendation: use /EHa. The boost implementation of
> execution_monitor is what I want to improve.
> > 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).
> b) Why is not required? According to David under /EHs the compiler is
> free to optimize away exception frames if it does not see code that can
> throw, now if eventually *the technique* generates a C++ throw who knows
> what could happen?
You absolutely should use /EHa if your SE translator throws C++ exceptions.
(Please note, that a rethrow even though it's a C++ syntax is not equivalent
to throw a distinct C++ exception)
IIRC execution_monitor uses either the technique based on an
environment variable. So you need to compile with /EHa to get
correct unwinding semantics.
BTW: I have never tried but I think you can mix /EHa and /EHsc.
Since it's not really portable anyway youd probably want to go
with both C++ and structured exception handling
( ie. with __try/__except/__finally) in VC.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk