stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <tvi...@quovadx.com>
Subject RE: svn commit: r565959 - /incubator/stdcxx/trunk/etc/config/src/EXTERN_C_EXCEPTIONS.cpp
Date Wed, 15 Aug 2007 00:17:59 GMT

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.

I think this is by design, but I found it a little weird that the ascii
value of the first character of each parameter is passed to
div_throw/div_nothrow. I had the urge to add modify the argument
processing lines to something more like this so that I could pass
arguments and get the expected results.

    const int x = argc < 2 ? 0 : int (*argv [1]) - '0';
    const int y = argc < 3 ? 0 : int (*argv [2]) - '0';

Travis

>
>Author: sebor
>Date: Tue Aug 14 15:48:02 2007
>New Revision: 565959
>
>URL: http://svn.apache.org/viewvc?view=rev&rev=565959
>Log:
>2007-08-14  Martin Sebor  <sebor@roguewave.com>
>
>	* EXTERN_C_EXCEPTIONS.cpp: New config test to determine whether
>	it's possible to throw exceptions from functions with C language
>	linkage.
>
>Added:
>    
>incubator/stdcxx/trunk/etc/config/src/EXTERN_C_EXCEPTIONS.cpp  
> (with props)
>
>Added: incubator/stdcxx/trunk/etc/config/src/EXTERN_C_EXCEPTIONS.cpp
>URL: 
>http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/src/EXTE
RN_C_EXCEPTIONS.cpp?view=auto&rev=565959

Mime
View raw message