This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [basic-improvements] try/finally support for c/c++ - more tests
- From: Mike Stump <mrs at apple dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Zack Weinberg <zack at codesourcery dot com>, Richard Henderson <rth at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>, Aldy Hernandez <aldyh at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "jason at redhat dot com" <jason at redhat dot com>
- Date: Thu, 7 Nov 2002 09:40:35 -0800
- Subject: Re: [basic-improvements] try/finally support for c/c++ - more tests
On Wednesday, November 6, 2002, at 10:34 PM, Mark Mitchell wrote:
#define pthread_cleanup_push(routine_, arg_) \
__builtin_cleanup_block(routine_, arg_) {
#define pthread_cleanup_pop(doit_) \
__builtin_toggle_do_cleanup(doit_); }
Something like this is a much, much closer to what I think we should
do.
The added benefit is that no changes need to be made to programs that
understand and process C source code. Plus, if one doesn't care about
C++ interoperability, those can be implemented in normal C on non-gcc
platforms. This is useful in being able to port code from one platform
to another.