stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r565959 - /incubator/stdcxx/trunk/etc/config/src/EXTERN_C_EXCEPTIONS.cpp
Date Tue, 21 Aug 2007 18:25:40 GMT
Farid Zaripov wrote:
>> -----Original Message-----
>> From: Martin Sebor [mailto:sebor@roguewave.com] 
>> Sent: Saturday, August 18, 2007 12:00 AM
>> To: stdcxx-dev@incubator.apache.org
>> Subject: Re: svn commit: r565959 - 
>> /incubator/stdcxx/trunk/etc/config/src/EXTERN_C_EXCEPTIONS.cpp
>>
>>> 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?
> 
>   There's no #pragma for that, but we can compile all cpp files with
> /Ehsc,
> and some set of specified files with /EHs.

Okay, that's something to consider. We'll have to see how pervasive
the use of __rw_once() will be as soon as I'm done switching to it
(so far I think it'll be needed in only a handful of places) and
whether any of the initialization functions will potentially throw.

Btw., from the MSVC Exception Handling Model:
http://msdn2.microsoft.com/en-us/library/1deeycx5(VS.80).aspx
it looks like by default the compiler generates code that makes
catch blocks catch structured exceptions (in addition the C++
kind). That's generally considered bad practice, but it may be
relied on by user code for historical reasons. We need to be
careful not to impose requirements on our users that would go
against this historical practice (doing so could break working
code).

Martin

Mime
View raw message