From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arsen =?utf-8?Q?Arsenovi=C4=87?= Newsgroups: gmane.emacs.devel Subject: Re: Merging feature/android Date: Mon, 06 Mar 2023 11:56:09 +0100 Message-ID: <86mt4qxhf7.fsf@aarsen.me> References: <87edq7ztks.fsf.ref@yahoo.com> <87ttz2w4c3.fsf@yahoo.com> <83356mcbxw.fsf@gnu.org> <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> <867cvuz1hp.fsf@aarsen.me> <87r0u2qi7w.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7214"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Paul Eggert , Eli Zaretskii , emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 06 12:13:13 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 1pZ8mH-0001dx-1Y for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Mar 2023 12:13:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZ8le-0003u2-HQ; Mon, 06 Mar 2023 06:12:34 -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 1pZ8lY-0003sg-Jc for emacs-devel@gnu.org; Mon, 06 Mar 2023 06:12:30 -0500 Original-Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pZ8lW-0004ew-Pm; Mon, 06 Mar 2023 06:12:28 -0500 Original-Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4PVbWl0Zbrz9sSy; Mon, 6 Mar 2023 12:12:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1678101139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rqY0Y+Bd/TmDEkff7KfVctcrTBGWz9ZoOU1bxQrQv5k=; b=a1Vh+7gXsxGmz3M6VuHzMpvNiGcvdr6qdBUXMcHdf2zh4hUoH0vznPc6vw9d8ryT4A/xVH tv4Z9L3x5JELNu2vl+ZpNzkDXqdj1/TiMj56p6AcyynZ/LtZCLxLDmDpK0+7c7gr/mvG/J QUI+1qug+B4tm42ZXO3NdtciAeTnQUqr25CIIl2Z4fS2/nK8jypEQCUmip4h20a6AayoZU iMLhx6rbGtRrF/KaKAAomdL5zBiEajStzvV4HJnqz+Ho5oMz/LLnpdHtgKUc1dECU0VM50 QZWkN8p3xqPHZel9iCAZDH9ubRRx91OniVR6RSjf1El4vXkPj7EtibA7DHiKvQ== In-reply-to: <87r0u2qi7w.fsf@yahoo.com> Received-SPF: pass client-ip=2001:67c:2050:0:465::103; envelope-from=arsen@aarsen.me; helo=mout-p-103.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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:304027 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Po Lu writes: > Arsen Arsenovi=C4=87 writes: > >> Depending on how long ago that was, it might be worth reconsidering. >> GCC has been C++ for a decade now, for instance, so C++ compilers are >> likely fairly widespread. One could make the case that using portable >> C++ in addition to portable C is a more portable way to do cleanups than >> GNU C cleanups. >> >> If still undesirable, I strongly suggest at least using GNU C cleanups. >> They are a decent workaround. > > GNU C cleanups only work when compiling with -fexceptions. This is not the case. They work under all conditions, and are used to great effect in many C codebases. As an example, the following: int f (void (*foo) (void)) { __attribute__ ((cleanup (test))) int* n =3D g (); foo (); } ... generates: f: pushq %rbx xorl %eax, %eax movq %rdi, %rbx subq $16, %rsp call g movq %rax, 8(%rsp) call *%rbx leaq 8(%rsp), %rdi call test /* cleanup */ addq $16, %rsp popq %rbx ret ... with -O3 -fno-exceptions. The latter is the default for C, but I wanted to be explicit anyway. > C++ is an ugly and bloated language, and not as widely available as you > think. To use it in Emacs for something as important as modules would > be a shame. It is likely as widely available as cleanup attributes. Certainly as widely as any supported (or many unsupported) versions of GCC are. I won't argue on the merits of the language, as that usually doesn't go anywhere, and the cleanup attribute seems like an accepted solution anyway. Note that it's no coincidence that it is being adopted by some GNU projects. > Either way, we don't expect to survive a C++ exception, so why cater > specifically to C++'s stack unwinding? I agree that it isn't necessary. I was just answering the question of what '-fexceptions' would do as someone with the know-how, because it was brought up. =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZAXKjF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTU9YA/14GSWOSecbF7kuWXPukZTx0FVjdyWN+M8Us 7YfrK3ngAP9sG+2zfr77D+DJELtwmDwC3s/2ooPtG+nIAcehQk4NBg== =eymj -----END PGP SIGNATURE----- --=-=-=--