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: __attribute__ ((cleanup)) and emacs-module.c Date: Thu, 09 Mar 2023 18:20:35 +0800 Message-ID: <87cz5ijkek.fsf_-_@yahoo.com> References: <87edq7ztks.fsf.ref@yahoo.com> <87ttyzs8q1.fsf@yahoo.com> <253e9494-6f78-89b7-8f5f-9c2e8461d95a@cs.ucla.edu> <878rgaspvs.fsf@yahoo.com> <86bkl6z1sc.fsf@aarsen.me> <87mt4qqi2o.fsf@yahoo.com> <83a60q84eo.fsf@gnu.org> <87a60qqb0c.fsf@yahoo.com> <83y1oa6k71.fsf@gnu.org> <87sfehpfcv.fsf@yahoo.com> <83a60o7mif.fsf@gnu.org> <87jzzspvcl.fsf@yahoo.com> <83ttyw65v5.fsf@gnu.org> <4B15D851-5638-48E6-A789-3017A1CBA971@yahoo.com> <8584ff7c-f83e-18b1-1300-dfa0788e4443@cs.ucla.edu> <87v8jbohk4.fsf@yahoo.com> <831qlz5pas.fsf@gnu.org> <87356en2w7.fsf@yahoo.com> <83o7p22xq4.fsf@gnu.org> <875ybal55j.fsf@yahoo.com> <83fsae2sc3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4496"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: eggert@cs.ucla.edu, arsen@aarsen.me, emacs-devel@gnu.org, Philipp Stephani , Daniel Colascione To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 09 11:21:23 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 1paDOk-0000vU-Ut for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Mar 2023 11:21:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paDOJ-0001b4-G2; Thu, 09 Mar 2023 05:20:55 -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 1paDOD-0001Zu-LM for emacs-devel@gnu.org; Thu, 09 Mar 2023 05:20:50 -0500 Original-Received: from sonic317-28.consmr.mail.bf2.yahoo.com ([74.6.129.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1paDOB-0002rQ-Q8 for emacs-devel@gnu.org; Thu, 09 Mar 2023 05:20:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1678357246; bh=F+lxrGgr0DWdQU0dzNbvvct6AVNBisUpRZgUYJ5Yfck=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=clian/WDdrA/ogMMrRFZnH5kWpBzZNvrBUdh/bxYuMEV0DhPLlzaRT5Mox8WXp0EeqlABkUo6drjorU8QocOrP00qRG0Qck2pKsGirIKYBPIX/4KJVIA9P3bTSUm/At0K7e201EARJw4ur1e2VlJOSlF8EF2GJl2n95Jc6++EUBxDMFG1L+UCBECiB3H+Ehbikb4IHFV8OLeSq0YfojImLuifQaFy86FM6YeRg2r0jBCv4AXKNQ6Qjh7BfAIY7FQhS0Fm4WocnXzxKHFe5wFeIVWjPdhhN7rwPi3qXHre61fw8yq4WQIMVbnyD/rA2jMm3+UAjs1oY0apySAX2je+A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1678357246; bh=nyyM+Ow77w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OS1N9qgRk_Z IlrUONITXesu7K7lMUjy6HvOm1kIBLZQGpa3H9oOaYDh4VkKy9qiTG_C.GNehiCJtVQ4GE_j6KTT 8vaZts3na8Q9b5jH1Y1.9TMAPlt6YdCKqI9yYcsdpXHLfJ4A8vXOA4LtXVis0y1lIJXTqGsf7vEZ tdq2Drt2k4j2yH4Loy1Q2ryh.cwoRQsarbJRTkD6BT X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.bf2.yahoo.com with HTTP; Thu, 9 Mar 2023 10:20:46 +0000 Original-Received: by hermes--production-sg3-67c57bccff-wt27l (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 76cebed2114d4083f7ab63d2ef2e473e; Thu, 09 Mar 2023 10:20:41 +0000 (UTC) In-Reply-To: <83fsae2sc3.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 09 Mar 2023 11:21:16 +0200") X-Mailer: WebService/1.1.21284 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=74.6.129.83; envelope-from=luangruo@yahoo.com; helo=sonic317-28.consmr.mail.bf2.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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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:304180 Archived-At: Eli Zaretskii writes: >> From: Po Lu >> Cc: eggert@cs.ucla.edu, arsen@aarsen.me, emacs-devel@gnu.org >> Date: Thu, 09 Mar 2023 16:07:04 +0800 >> >> Eli Zaretskii writes: >> >> > I disagree with your conclusion, and I still think we should complain >> > noisily if modules cannot be supported. >> >> OK, but I still think this is a very bad idea. Do you object to >> rewriting emacs-module.c to not utilize __attribute__ ((cleanup))? >> >> What was said earlier by some people is wrong: as-is, in Emacs, it makes >> no difference whether or not we write: >> >> foo __attribute__ ((cleanup (module_reset_handlerlist)))... >> >> or: >> >> foo... >> module_reset_handlerlist (foo); > > If you want to discuss this, please start a new thread and CC Daniel > Colascione and Philipp Stephani, who I believe wrote that part of > emacs-module.c. I don't think we should change that without a > thorough discussion, as that code is quite old and I don't think it > caused any trouble whatsoever. Ok. Phillip, Daniel, I'd like to replace the use of the `cleanup' attribute in emacs-module.c with portable C code. The reason is that it is implemented unsatisfactorily or not at all in certain compilers I want to use. This includes Sun C 5.10, and various versions of the Android NDK GCC that crash generating debuginfo. Since Emacs is not built with C++ exception handling, there should be no reason to use that attribute. Any objections? Thanks in advance.