__attribute__((cleanup(function)) versus try/finally
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Tue May 13 21:33:00 GMT 2003
> 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.
More information about the Gcc
mailing list