From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#63556: 29.0.90; Use of _Generic breaks Emacs build on GCC <4.9 Date: Thu, 18 May 2023 07:40:47 -0700 Organization: UCLA Computer Science Department Message-ID: References: <4b378d55-ef65-7a0f-b03d-e304785cf60d@cs.ucla.edu> <87v8gp51ys.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22197"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Cc: Spencer Baugh , 63556@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 18 16:41:17 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pzeof-0005YR-J1 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 May 2023 16:41:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzeoS-00013C-K1; Thu, 18 May 2023 10:41:04 -0400 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 1pzeoQ-00010U-2g for bug-gnu-emacs@gnu.org; Thu, 18 May 2023 10:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pzeoP-0002Ca-Ri for bug-gnu-emacs@gnu.org; Thu, 18 May 2023 10:41:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pzeoP-00049X-Ml for bug-gnu-emacs@gnu.org; Thu, 18 May 2023 10:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 May 2023 14:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63556 X-GNU-PR-Package: emacs Original-Received: via spool by 63556-submit@debbugs.gnu.org id=B63556.168442085715945 (code B ref 63556); Thu, 18 May 2023 14:41:01 +0000 Original-Received: (at 63556) by debbugs.gnu.org; 18 May 2023 14:40:57 +0000 Original-Received: from localhost ([127.0.0.1]:54043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzeoL-000495-6Z for submit@debbugs.gnu.org; Thu, 18 May 2023 10:40:57 -0400 Original-Received: from mail.cs.ucla.edu ([131.179.128.66]:37272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzeoI-00048l-3M for 63556@debbugs.gnu.org; Thu, 18 May 2023 10:40:55 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 099C03C09FA2A; Thu, 18 May 2023 07:40:48 -0700 (PDT) Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id LhKPEVXDk_UL; Thu, 18 May 2023 07:40:47 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id BA8483C09FA2B; Thu, 18 May 2023 07:40:47 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu BA8483C09FA2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1684420847; bh=b4i71qTG5P+fl0f9ZxMQw6haaGn0/kkjnTNk3p+dQ2w=; h=Message-ID:Date:MIME-Version:To:From; b=rPjf6g1FYLdpG8b62rGjp/qfvlUhxDP1Bp6XiO/kQPsrfilXb94CQ4L9BT5QRqNYN bPcOrfUnaW00R4BxSTl9YC1KHwIBmfKiLjh2uiIf64vN70Ye+5jpEApOugE6dN580S hLGKDw4UXYtd/X6+BSacqnDN9oa9A0O9j2DgLYmKREJd4xOZuNomDeAM4jJTc1C4yP ZbFZL8bJNFKQawdDNIekp9GOgYGvK4MLjMmAmWMUpFMTSMaazj5S+tqf17yYKJdb06 qkEpU1ACAK4r4b553egbYtV0uSMl16OuIfBdUKANxkjf2Ui+por4BBRkVC95hwlIY/ 0t86eY5JisZsA== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uwLyiaOOOpJa; Thu, 18 May 2023 07:40:47 -0700 (PDT) Original-Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 9F93C3C09FA2A; Thu, 18 May 2023 07:40:47 -0700 (PDT) Content-Language: en-US In-Reply-To: <87v8gp51ys.fsf@yahoo.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261937 Archived-At: On 5/18/23 04:11, Po Lu wrote: > Would anyone mind if I made configure check for that? There would be problems in doing that. GCC and Clang both have problems with _Generic (suggested by this original bug report), and some of them have to do with which warnings you've enabled. The configure-time check would run without the warnings whereas the build would run with them. This is partly why intprops-internal.h has given up on _Generic with GCC and Clang; see its ifdefs. I assumed that these problems didn't apply to their simple use in elogb, but apparently I assumed incorrectly. > Btw, couldn't the macro be defined to something along the lines of this > when the compiler only supports C99? > > #define foo(expression) \ > (sizeof (expression) == sizeof (signed char) \ That wouldn't work on unusual platforms that have padding bits. Of course we could simply refuse to port to targets like that; still, I'd be reluctant to do that just for this little issue. > The problem of using `long long' on systems with less than 64 > significant bits in their words. I don't think that's a particularly > good idea -- once such uses pile up, Emacs will gradually become slower > and slower on such systems. I couldn't measure the slowdown in this case. Until it's measurable I wouldn't worry about it. To some extent I put in that _Generic originally more as documentation than as an actual attempt to speed things up.