Boost logo

Boost :

Subject: Re: [boost] Half-baked GIL IO extension review
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2010-12-06 19:47:24


On Mon, Dec 6, 2010 at 4:26 PM, Edd Dawson <lists_at_[hidden]> wrote:
> Hi Emil,
>
> On 12/6/2010 11:45 PM, Emil Dotchevski wrote:
>>
>> On Mon, Dec 6, 2010 at 3:10 PM, Edd Dawson<lists_at_[hidden]>  wrote:
>>>
>>> Looking again at the JPEG code here. As far as I can tell setjmp/longjmp
>>> have been used with appropriate care, but I worry what will happen if a
>>> method on a Device throws an exception, for example. I've had both Visual
>>> C++ 2008 and Apple's g++ 4.0.1 crash on me in this kind of situation.
>>
>> Did you use -fexceptions with GCC, and if I'm not mistaken MSVC also
>> has an option to assume that C functions don't throw exceptions, which
>> shouldn't be used for exceptions to work.
>
> I suspect that -fexceptions was not in play but it's conceivable that our
> build system adds it automatically when compiling C. I'll double check when
> I'm at work tomorrow.

If I'm not mistaken, the default for GCC is to assume C functions
can't emit exceptions, -fexceptions tells it that they could. A few C
libs seem to be compatible with this setup, for example with libpng I
register an error callback function which throws, and it works fine
but only if -fexceptions is used.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk