stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <>
Subject RE: svn commit: r565959 - /incubator/stdcxx/trunk/etc/config/src/EXTERN_C_EXCEPTIONS.cpp
Date Tue, 21 Aug 2007 23:05:32 GMT

>Martin Sebor wrote:
>> Maybe when the documentation is referring to C functions it means
>> functions that are compiled as C source [x.c instead of 
>> x.cpp] and not functions with C linkage?
>Who knows... Have you tried it?

I have now. The compiler chokes on 'throw' when compiling C sources as
it should.

>Good questions.
>I suppose the potential overhead would be my biggest concern.
>The solution we discussed recently on another list (overloading
>pthread_once() for extern "C++" functions) involves dynamically
>allocating a small chunk of memory. That's a steep price to pay
>for one time initialization.

Well we wouldn't need to do that as the entire system would be
implemented in C++. You already provide such an implementation for the
windows configuration.

>But we might be solving a non-issue. I'm not sure yet that there
>are any one-time initializers in the library that can throw an
>exception. So I think we're safe until we've actually found one
>that does. Although it surely would be nice to have a robust
>solution in place just in case we add an initializer that can
>throw in the future.

Agreed, and agreed.

View raw message