incubator-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:36:15 GMT
William A. Rowe, Jr. wrote:
> Farid Zaripov wrote:
>>> From: Martin Sebor [mailto:sebor@roguewave.com] 
>>>
>>>> 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.
> 
> But, there is __declspec(throw) - right?

There is __declspec(nothrow) to indicate that a function cannot
throw exceptions (the default for C functions) but I don't see
one to indicate the opposite, i.e., that a C function can throw.
One would think it'd be the logical extension given that all C++
functions can throw by default and no C functions can.

Here's the latest man page on __declspec(nothrow):
http://msdn2.microsoft.com/en-us/library/49147z04(VS.80).aspx

Martin

Mime
View raw message