From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Merging feature/android Date: Mon, 06 Mar 2023 18:39:59 +0800 Message-ID: <87mt4qqi2o.fsf@yahoo.com> References: <87edq7ztks.fsf.ref@yahoo.com> <87pm9qvu9w.fsf@yahoo.com> <83y1odc37g.fsf@gnu.org> <87cz5pwf9c.fsf@yahoo.com> <83edq5asb3.fsf@gnu.org> <875ybhvt4w.fsf@yahoo.com> <83356kbxnh.fsf@gnu.org> <87lekcvho4.fsf@yahoo.com> <83r0u4adgd.fsf@gnu.org> <87a60suknn.fsf@yahoo.com> <83356jafll.fsf@gnu.org> <87o7p7tz16.fsf@yahoo.com> <83sfej8v17.fsf@gnu.org> <87fsajtrrx.fsf@yahoo.com> <83o7p78ns8.fsf@gnu.org> <87y1obsamf.fsf@yahoo.com> <0100f288-fcc0-8b91-5f12-18bf22969e50@cs.ucla.edu> <87ttyzs8q1.fsf@yahoo.com> <253e9494-6f78-89b7-8f5f-9c2e8461d95a@cs.ucla.edu> <878rgaspvs.fsf@yahoo.com> <86bkl6z1sc.fsf@aarsen.me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38005"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Paul Eggert , Eli Zaretskii , emacs-devel@gnu.org To: Arsen =?utf-8?Q?Arsenovi=C4=87?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 06 11:40:27 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZ8GY-0009hH-RX for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Mar 2023 11:40:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZ8GL-00015e-Dz; Mon, 06 Mar 2023 05:40:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZ8GJ-00015N-WE for emacs-devel@gnu.org; Mon, 06 Mar 2023 05:40:12 -0500 Original-Received: from sonic310-23.consmr.mail.ne1.yahoo.com ([66.163.186.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZ8GI-0007wC-5A for emacs-devel@gnu.org; Mon, 06 Mar 2023 05:40:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1678099208; bh=/q+neFomWiRiEN1zgzN93VKCSG3g0e/I1Wsg8k6BYxs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=dlODcopNC8o1XamjueV4xH+87D4/q67ZEzdCZqykNixzVvtiBAr/eNJs2od3EFvVZsDLJMfl8uE3U0/x14O7nkwxKIqnSdRokRwAhDA/F+ZrVbY6ED6EsH7qs0iS3FTUFqzxstt3qCTozRaMCrUFI7nZANlIPc3ihJC5eqa5h7xgRvurM6kzcd53Ayy12PIDNqLb6qGxJMHbA6cWbHnwEeQjea/c5M4moE/WyKB91pqjhyXAEdFEN1gGmqgXHc/VJOkVMIFqR6rJq6nMKnPAbuosggxuCl4H2OClHUkThOt2gINbRGPSWBPmIU5ZSubKJBimCfGw1IGWhGDKgxlUhA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1678099208; bh=hPZ/7EvdPcO7rdyTXis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RFKVZpNaMzU7iX_mu zerExoFA3CHGIj_VSWOj9NRxZoAW2PkIFMu7oGg99CgeI1ijFXJxl7svcHDfDivjZHAaniDiZh7a Ah4SiRnO6c4a19JZcf8VzS9xLuz_2Mjz.9PvPrLzv4bl.igd4tmhOaeCZFP6Qq6gd4Z1pY1.Zefn IFLFN5SFFD5ONy8mjcrzC8qc8bVshYxejaTOmSvcI1 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Mon, 6 Mar 2023 10:40:08 +0000 Original-Received: by hermes--production-sg3-67c57bccff-4xlmw (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a7f1c72bfeb01934212a6cd0d58a0ba5; Mon, 06 Mar 2023 10:40:03 +0000 (UTC) In-Reply-To: <86bkl6z1sc.fsf@aarsen.me> ("Arsen =?utf-8?Q?Arsenovi=C4=87?= =?utf-8?Q?=22's?= message of "Mon, 06 Mar 2023 09:58:27 +0100") X-Mailer: WebService/1.1.21221 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.186.204; envelope-from=luangruo@yahoo.com; helo=sonic310-23.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304024 Archived-At: Arsen Arsenovi=C4=87 writes: > -fexceptions is useful if it is possible to get a call stack which > invokes C++ through a C function through a C++ function, for instance, > if the comparator of a qsort could throw. This provides the user of a > given C API to gracefully handle thrown errors. Alternatively, it also > allows the C API developers to (mostly) gracefully clean up when a C++ > exception remains uncaught. This is why libc is compiled with > -fexceptions for instance. > > __attribute__((cleanup)) will run cleanups during stack unwinding: Only if you build Emacs with -fexceptions. > =E2=80=98cleanup (CLEANUP_FUNCTION)=E2=80=99 > The =E2=80=98cleanup=E2=80=99 attribute runs a function when the var= iable goes out > of scope. This attribute can only be applied to auto function > scope variables; it may not be applied to parameters or variables > with static storage duration. The function must take one > parameter, a pointer to a type compatible with the variable. The > return value of the function (if any) is ignored. > > If =E2=80=98-fexceptions=E2=80=99 is enabled, then CLEANUP_FUNCTION = is run during > the stack unwinding that happens during the processing of the > exception. Note that the =E2=80=98cleanup=E2=80=99 attribute does n= ot allow the > exception to be caught, only to perform an action. It is undefined > what happens if CLEANUP_FUNCTION does not return normally. > > IMO, the price of exceptions is overblown, so it could be worthwhile > adopting this, if I understand the context right. If a C++ exception is thrown inside a module function, then we should IMO just let everything blow up. How are they different from any other kind of unexpected error in a dynamic module, such as for instance an arithmetic trap, memory access error, or perhaps a Pascal exception?