>Martin Sebor wrote:
>
>Travis Vitek wrote:
>> Martin,
>>
>> I'm not sure if you're aware, but I don't believe that the
>> destructors for stack objects inside the C functions will
>> be called. I know that this is the case for MSVC7/8. This
>> isn't an issue for your testcase, but it may be an issue
>> for the functions invoked by __rw_once.
>
>Interesting! I didn't know about this limitation. It's something
>we need to keep in mind when writing the initialization functions.
>Perhaps the solution will be to require the initialization function
>to have the empty exception specification. That way we could rely
>on the compiler to detect initialization functions that can throw.
>
I just found out that the /Ehc flag enables the nothrow default
for C linkage functions. So changing the /EHsc flag to /EHs will
fix this for both VC7 and 8.
Travis