From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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 14:42:27 +0300 Message-ID: <83wn15vpb0.fsf@gnu.org> References: <4b378d55-ef65-7a0f-b03d-e304785cf60d@cs.ucla.edu> <87v8gp51ys.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32974"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sbaugh@janestreet.com, eggert@cs.ucla.edu, 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 13:43:18 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 1pzc2Q-0008Rg-IF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 May 2023 13:43:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzc2C-0002Xd-7E; Thu, 18 May 2023 07:43: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 1pzc2A-0002XG-5B for bug-gnu-emacs@gnu.org; Thu, 18 May 2023 07:43: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 1pzc29-0003O6-UA for bug-gnu-emacs@gnu.org; Thu, 18 May 2023 07:43:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pzc29-0001w9-PI for bug-gnu-emacs@gnu.org; Thu, 18 May 2023 07:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 May 2023 11:43: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.16844101467403 (code B ref 63556); Thu, 18 May 2023 11:43:01 +0000 Original-Received: (at 63556) by debbugs.gnu.org; 18 May 2023 11:42:26 +0000 Original-Received: from localhost ([127.0.0.1]:52239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzc1a-0001vK-7l for submit@debbugs.gnu.org; Thu, 18 May 2023 07:42:26 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzc1X-0001v6-Sk for 63556@debbugs.gnu.org; Thu, 18 May 2023 07:42:25 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzc1R-000386-QR; Thu, 18 May 2023 07:42:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=eOKh/bsdqSU46LZJzb/8rUoFHOcXmejI9QGI1jAQ2Y4=; b=jXyqPEyC2VJ1 wYfMgVLU4X6V6ymYY/9TADo3+67qlJHVM8e7kVavUMtgRgxNMEmt+4ZwTVGyGCT60/eQb6ZOcY9Rb XST8QhAuNAh7Vg42uAb1Uis3HiavN/OXEB6+Gk0Oy+Iy7jj8E+Ad4t87joeK05a0jGoRwNehvk2RS 4pSmIrc5IQ/7EqNPffhUkuZCUayBTaxoMR9fIEhvUlf/bCpNTv/rotZnXO8clWDPILzsodOZ/LD13 qqPMgiLdmjxsJv8J5OUgfjc1NsAYSeMXqoPf53adgGintuIWfY2nq43ZCvVzlNKtuqh9stE/yd11e YcAWoAVFziyORI6Ya6PU+g==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzc1P-0001Z3-H9; Thu, 18 May 2023 07:42:17 -0400 In-Reply-To: <87v8gp51ys.fsf@yahoo.com> (bug-gnu-emacs@gnu.org) 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:261924 Archived-At: > Cc: Spencer Baugh , 63556@debbugs.gnu.org > Date: Thu, 18 May 2023 19:11:07 +0800 > From: Po Lu via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Paul Eggert writes: > > > Thanks for reporting the problem. Since _Generic is used here merely > > as a micro-optimization on 32-bit platforms, it's not worth whatever > > porting hassle you've run into, so I installed the attached patch so > > that modiff no longer uses _Generic. > > Would anyone mind if I made configure check for that? Depends on how complex is that, and what problem does it solve. > 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) \ > ? code_for_signed_char \ > : (sizeof (expression) == sizeof (short int) \ > ? code_for_short_int \ > : (sizeof (expression) == sizeof (int) \ > ? code_for_int \ > ... and so on AFAIR, sizeof is a compile-time expression, the preprocessor cannot evaluate it.