From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: master 37889523278: Add new `swap` macro and use it Date: Wed, 17 Jan 2024 02:16:54 -0800 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25081"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Po Lu , Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 17 11:17:54 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 1rQ2za-0006Gr-4z for ged-emacs-devel@m.gmane-mx.org; Wed, 17 Jan 2024 11:17:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQ2yk-00055f-Hr; Wed, 17 Jan 2024 05:17:02 -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 1rQ2yh-00055P-6o for emacs-devel@gnu.org; Wed, 17 Jan 2024 05:16:59 -0500 Original-Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQ2yf-0000HE-FB; Wed, 17 Jan 2024 05:16:58 -0500 Original-Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-559d0ef3fb5so670280a12.3; Wed, 17 Jan 2024 02:16:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705486615; x=1706091415; darn=gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=f6pAhmT0yArX9ipwK2zfK1v5mR07hdZtlgk34Mi2ke0=; b=L1QScQUIpnFZWw/zA6UlsEyzD5C3nZPdQGHYvBiZTp4/OKkn0bLRVVvGg8eTF3+j4o PLE0vwxEHmoDIS+0LD8wIPJcgK8RbCwil409EBJ+KBHvCqK4l+eF3O/HQsvfOVBw7lYU rvZKuGa+AaQJ1VPB1rlgBib74aG4U4YgC00x6mGKsFOy5SKzCHwsgUy/zEElSYLU1CPj u3S56BnUJiK+iCrSvMM4iJH3UjnwJZaKP5KuoBTxB6qGK6+nUo6op2wOfWclnK6MG/9t UFlKKFd8tugDmEhUzeqP/fMOXy80nUVeXqg4PquGsRW1HlvDfW6saL5eq4el7QW3sCcY tvNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705486615; x=1706091415; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=f6pAhmT0yArX9ipwK2zfK1v5mR07hdZtlgk34Mi2ke0=; b=QtsyZERyEedbODKPWy37xClmG9Z16dFKNfsan/YoA6oHlRogudvKf8vtxh2A2kdp3k PHZOJK0e5I8OabFZpDBL0ID3+H9byyBDjEB3lRXKixvXVk9LbAoegoC+ue8GIYWK6MAn X6A3VpM3hoU5Ohz4eaNOoJ21Wp55YiKf7J7o5lnFy3Q2nRHcMdzkMVHC68DGTM41eaHG jLICUYZ8kXT2qCVsM0+nwvDbLvLDkHmrAMeWxAQPjce5IvDUpVhxiGk+t8b/N3cH1f15 ubYOI863x9s6htPAyy7g07kmWaN5ObZqbZScQxfnSb+IPdUhp5V3jyvN83qoRt9dZS81 LWyA== X-Gm-Message-State: AOJu0Yxg6a28mIxEyXEGyzssSRoa6xqyCnfTwY7E2QiMWdOSdCF5G+Vq lmQ+HV2Y07L613ctfugkQ2ijHWBtEaGe4Y5dWhI= X-Google-Smtp-Source: AGHT+IGWgd7C0+ASl1mndbeEk8RrhKNKYptXX+hPj5LNIB0DBGTOj2cTi7pa03hLkG+4f+hETbIOtkrnd7/C7RANhhk= X-Received: by 2002:a05:6402:3182:b0:557:bee6:4dac with SMTP id di2-20020a056402318200b00557bee64dacmr3975397edb.27.1705486615091; Wed, 17 Jan 2024 02:16:55 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 17 Jan 2024 02:16:54 -0800 In-Reply-To: <87bk9o1ooo.fsf@yahoo.com> Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=stefankangas@gmail.com; helo=mail-ed1-x536.google.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, T_SCC_BODY_TEXT_LINE=-0.01 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:315029 Archived-At: Po Lu writes: > Gregory Heytings writes: > >> FYI, Stefan's change did not break any build. "typeof" is supported >> by all compilers with which Emacs can be built, either with the >> keyword "typeof" or with the keyword "__typeof__". The only notable >> compiler that does not support "typeof" is MSVC, with which Emacs >> cannot be built. > > Stefan's change (which I reverted) did not use __typeof__. BTW, we already use typeof in Emacs 29.1: ./src/pgtkselect.c:1158: ldata = (typeof (ldata)) data; This was introduced in commit be35c92c90d455739a6ff9d4beefa2b35d044852 Author: Po Lu Date: Tue Jun 21 22:03:42 2022 +0800 Rewrite PGTK selection code from scratch I don't see any problem with that, and judging by the lack of bug reports, neither do our users. Maybe it's worth changing it to use __typeof__. >> "Every implementation in existence since C89 has an implementation of >> typeof. Some compilers (GCC, Clang, EDG, tcc, and many, many more) >> expose this with the implementation extension typeof. [...] This >> feature is the most "existing practice"-iest feature to be proposed to >> the C Standard, possibly in the entire history of the C standard. The >> feature was also mentioned in an "extension round up" paper that went >> over the state of C Extensions in 2007. typeof was also considered an >> important extension during the discussion of that paper, but nobody >> brought forth the paper previously to make it a reality." > > Considering that EDG and GNU/Linux compilers are the only compilers you > have named as examples, this list is nowhere near sufficient to prove > that "typeof" does not break any build. It was the C standards committee guys that wrote the above, not Gregory. > Which is a very presumptuous statement whatever the length of your > list, when a build breaking was in fact the reason for this change... I guess that wasn't a puregtk build.