From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7870 invoked by alias); 7 Nov 2002 16:14:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 7861 invoked from network); 7 Nov 2002 16:14:45 -0000 Received: from unknown (HELO localhost.localdomain) (66.60.148.227) by sources.redhat.com with SMTP; 7 Nov 2002 16:14:45 -0000 Received: from warlock.codesourcery.com (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.11.6/8.11.6) with ESMTP id gA7GC5J19895; Thu, 7 Nov 2002 08:12:05 -0800 Date: Thu, 07 Nov 2002 08:14:00 -0000 From: Mark Mitchell To: Michael Matz cc: Zack Weinberg , Richard Henderson , Jakub Jelinek , Aldy Hernandez , "gcc-patches@gcc.gnu.org" , "jason@redhat.com" Subject: Re: [basic-improvements] try/finally support for c/c++ - more tests Message-ID: <19940000.1036685525@warlock.codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-SW-Source: 2002-11/txt/msg00461.txt.bz2 > Standards fixate existing practice, they don't establish it. We've already got a standard that's relevant here. In particular, we have the C++ programming language, which provides the functionality needed. If you need that functionality, use that language, or another language (like Java, Ada, etc.) that provides that functionality. Now, I'm not fully understanding how this is going to be used, which is perhaps coloring my thinking. I'm getting the impression that this functionality is going to get buried in C headers that are going to get seen in *user* C code. Is that true? If it is true, it makes my above remark irrelevant; we need something that works in C. The question, of course, is *what* do we need. Let me try to see if I've got right what it is we're trying to accomplish. If I don't have it right, I'll not be intelligent in the discussion, so please correct me. We're trying to implement one particular piece of functionality required by the POSIX threads interface; namely "pthread_cleanup_push" and friends. (I know that any feature might get used more widely, but this is the motivation, as I understand it.) Furthermore, we're trying to make the POSIX threads cleanups play nice with exception-handling. Or are we trying to use EH mechanisms to make things go faster? Anyhow, if I write: try { pthread_cleanup_push (...); throw 3; } catch (...) { } and the system arranges to run the cleanup when the exception is thrown, the system is badly broken. So, I think I'm not getting the point. What interface is it that we think we need this functionality to implement? -- Mark Mitchell mark@codesourcery.com CodeSourcery, LLC http://www.codesourcery.com