Travis Vitek wrote:
Martin Sebor wrote:
Farid Zaripov wrote:
I've just tried to declare and define __rw_once with throw(...)
exception specification and compiler doesn't issues warning in
that case.
Yes, but the documentation linked to explicitly says...
Explicit exception specifications are not allowed on C functions.
[http://msdn2.microsoft.com/en-us/library/wfa0edys(VS.80).aspx]
I tested, it does compile, and the destructors are getting called as
they should when an explicit throw(...) spec is added to the C linkage
function. That said, I cringe at the thought relying on behavior that is
documented to not work or is not supported.
FWIW, I looked to see if throw(...) is being used by any projects
out there and what for. I've found a few but none very helpful. In
particular, I found only one extern "C" function with throw(...),
and that's in some toy example. All the other hits point to C++
functions:
http://www.google.com/codesearch?q=throw%5C+*%5C%28%5C+*%5C.%5C.%5C.%5C+*%5C%29+lang%3Ac%2B%2B
Martin