stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: svn commit: r565959 - /incubator/stdcxx/trunk/etc/config/src/EXTERN_C_EXCEPTIONS.cpp
Date Fri, 17 Aug 2007 21:00:00 GMT
Travis Vitek wrote:
>> 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.

Do you happen to know if there's a #pragma that will let us select
the mode we need for just the one function?


View raw message