This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __attribute__((cleanup(function)) versus try/finally


    > In any case, there are some semantics to be defined; if a cleanup throws
    > an exception, what happens?

    At present, the old exception doesn't get destroyed, and the new
    exception propagates.  I'm not really sure *what* should be said
    except that it's undefined behaviour.

Just FYI, in Ada this is defined and the action depends on how the
cleanup was invoked.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]