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: master 37889523278: Add new `swap` macro and use it Date: Mon, 15 Jan 2024 21:56:58 +0800 Message-ID: <87v87uya1h.fsf@yahoo.com> References: <170452579053.27998.16123231327386305897@vcs2.savannah.gnu.org> <20240106072311.28B8FC0034E@vcs2.savannah.gnu.org> <87plye9ahs.fsf@yahoo.com> <83o7dyua0d.fsf@gnu.org> <87le9297ei.fsf@yahoo.com> <87cyue92fx.fsf@yahoo.com> <877ckm8uzz.fsf@yahoo.com> <83v886sgtl.fsf@gnu.org> <4719da9bc2bbcffdb634@heytings.org> <87bk9o1ooo.fsf@yahoo.com> <83cyu4fl4o.fsf@gnu.org> <877ckc1gs9.fsf@yahoo.com> <83a5p8fehd.fsf@gnu.org> <83bk9mepkt.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="1972"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Gregory Heytings , stefankangas@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 15 14:58:03 2024 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 1rPNTX-0000HF-DE for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Jan 2024 14:58:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rPNSr-0004rF-HP; Mon, 15 Jan 2024 08:57:21 -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 1rPNSo-0004r3-OH for emacs-devel@gnu.org; Mon, 15 Jan 2024 08:57:18 -0500 Original-Received: from sonic305-21.consmr.mail.ne1.yahoo.com ([66.163.185.147]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rPNSm-0005CQ-7R for emacs-devel@gnu.org; Mon, 15 Jan 2024 08:57:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1705327030; bh=XQJJfMTbgzXG4p+qwtLwbCaNaHotpVM55mhne2cUbNU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=GXqKyOxP+ZD2KWayM6ArZ/kQYmZExq2vVX1T5BolHGu1OT4dfkuKAURG3wrwiUCjqkP5IHUp1d9sn1qwljmV5b1ycwQnNXVeisnXPXkdOWQ3xtOkLY2ylOF/FAohXK+ovT1d/LAq+Z8bcvYVdRLEr5p86jRdxp4Sc+wch4fX9yVdso80pJJGbHOtv7VSqxM6XEMLnk+0OxPBHR65MlPbKW/3KjCZ+JxU+mv/z5PPol0WAACWZnTKHb/5Tp/wLxnZay07fjsJmHp+uGEiUdJsLA2z1FTtGYjmOpWZ1V6QrSQmvoPi4dfyDBWQDulhtawuba2qo1s1Gk+1d7o0bWZ9Ug== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1705327030; bh=GBgDA+mM5g8PJmUC9SLa+XcLQTKC3uJrfdznwaFIe7B=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=K++48YEaj+wEcqGNJqOxKI/uPu5VlDJMImaZmDLpvnBMT6s+yug3+4PuPxHoj+8aJXKvCCHrb1qG7wzsPWJGQLHw7UlD3CS6lBOav/CpXpAHS6b+c7Lr3Ypk2/N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zbqx9yD8gFOhw X-Sonic-MF: X-Sonic-ID: 569e2a06-2537-4d94-930d-2e239bc8f53b Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Mon, 15 Jan 2024 13:57:10 +0000 Original-Received: by hermes--production-sg3-677476f564-2fwms (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID f75d838ae0eb5734ca055ca7e738ba2a; Mon, 15 Jan 2024 13:57:04 +0000 (UTC) In-Reply-To: <83bk9mepkt.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 15 Jan 2024 14:41:38 +0200") X-Mailer: WebService/1.1.22010 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.185.147; envelope-from=luangruo@yahoo.com; helo=sonic305-21.consmr.mail.ne1.yahoo.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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:314989 Archived-At: Eli Zaretskii writes: >> Date: Mon, 15 Jan 2024 01:32:38 +0000 >> From: Gregory Heytings >> cc: Po Lu , stefankangas@gmail.com, emacs-devel@gnu.org >> >> >> >> Further proving my point, neither variant of typeof compiles with Sun C >> >> 5.8, a C99 compiler that does presently produce working Emacs builds. >> > >> > Which system configuration uses this compiler? When was that compiler >> > released? Are there newer versions of that compiler that do support one >> > of these keywords? >> > >> >> Sun C 5.8 is part of Sun Studio 11, which was released in 2005. Sun >> Studio 11 is an (optional) extension package for Solaris 10 / SunOS >> 5.10... on which GCC (3.4.3) is installed by default. >> >> Sun C 5.9, part of Sun Studio 12 (which is likewise an optional extension >> package for that same operating system), released in 2007, supports the >> typeof operator. > > Thanks. Given this information, I don't see why we should be bothered > with the deficiencies of Sun C 5.8. For the same reason we bother with the deficiencies of GCC 3.4.3 and other C compilers and OSes. It is not enough that Emacs work on some combination of supported system and compiler, it must work on _all_ combinations of C compiler and supported system, provided that the C compiler is reasonable, for which we have a definition provided by the C99 Standard. No doubt Emacs has failed to fulfill this strict (albeit not extreme) measure of portability on occasion, but such instances are far and few between, and their causes we promptly fix after being apprised of them. Between that and the fact that we have never willfully undermined the quality of our code in this respect, Emacs has thus far held up to its side of the bargain remarkably well. My point being that a `swap' macro, which is also generally discountenanced by C programmers, is not sufficiently compelling a reason to depart from doing so. This practice of ours is so well established as to justify a mention in the GNU Coding Standards identifying Emacs by name. (standards)Using Extensions: An exception to this rule are the large, established programs (such as Emacs) which run on a great variety of systems. Using GNU extensions in such programs would make many users unhappy, so we don't do that. Before you is one user who would be unhappy in such an event! FWIW: Sun Studio 5.8 and 5.12 were once standard on systems at my workplace, but we have since moved to a different C compiler that has rendered both and GCC redundant, and does not implement "__typeof__" in its default mode of operation, despite being usually configured for compatibility with Sun C. I will try to establish if its defaults are capable of compiling Emacs tomorrow.