> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com]
> Sent: Tuesday, August 21, 2007 9:36 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r565959 -
> /incubator/stdcxx/trunk/etc/config/src/EXTERN_C_EXCEPTIONS.cpp
>
> 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.
You're right. But there is throw(...) exception specification
which tells the compiler that the function can throw an exception.
http://msdn2.microsoft.com/en-us/library/wfa0edys(VS.80).aspx
Farid.
|