From Peter_Dyballa@Freenet.DE Sat Aug 23 02:00:39 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.3 required=4.0 tests=AWL,BAYES_00,IMPRONONCABLE_1, MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Aug 2008 09:00:39 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7N90aQC027663 for ; Sat, 23 Aug 2008 02:00:37 -0700 Received: from mail.gnu.org ([199.232.76.166]:54466 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KWoxj-00081d-SY for emacs-pretest-bug@gnu.org; Sat, 23 Aug 2008 04:59:12 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KWoz1-00064T-Je for emacs-pretest-bug@gnu.org; Sat, 23 Aug 2008 05:00:35 -0400 Received: from mout0.freenet.de ([195.4.92.90]:33708) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KWoz1-00064D-68 for emacs-pretest-bug@gnu.org; Sat, 23 Aug 2008 05:00:31 -0400 Received: from [195.4.92.23] (helo=13.mx.freenet.de) by mout0.freenet.de with esmtpa (ID peter_dyballa@freenet.de) (port 25) (Exim 4.69 #65) id 1KWoyz-0006dT-Uf for emacs-pretest-bug@gnu.org; Sat, 23 Aug 2008 11:00:29 +0200 Received: from p5b23ce2f.dip.t-dialin.net ([91.35.206.47]:56284 helo=[192.168.1.2]) by 13.mx.freenet.de with esmtpsa (ID peter_dyballa@freenet.de) (TLSv1:AES128-SHA:128) (port 25) (Exim 4.69 #12) id 1KWoyz-000641-O9 for emacs-pretest-bug@gnu.org; Sat, 23 Aug 2008 11:00:29 +0200 Mime-Version: 1.0 (Apple Message framework v753.1) Content-Transfer-Encoding: 7bit Message-Id: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> Content-Type: text/plain; charset=US-ASCII; format=flowed To: emacs-pretest-bug@gnu.org From: Peter Dyballa Subject: 23.0.60; interesting warning during compilation Date: Sat, 23 Aug 2008 11:00:28 +0200 X-Mailer: Apple Mail (2.753.1) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Hello! The warning from gcc 4.0.1 is: dired.c:1003: warning: right shift count >= width of type /* To allow inode numbers beyond 32 bits, separate into 2 24-bit high parts and a 16-bit bottom part. */ EMACS_INT high_ino = s.st_ino >> 32; EMACS_INT low_ino = s.st_ino & 0xffffffff; Mac OS X 10.4.11, CVS update yesterday. -- Greetings Pete A blizzard is when it snows sideways. From eliz@gnu.org Sat Aug 23 07:36:49 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2,RCVD_IN_DNSWL_LOW, RCVD_IN_NIX1 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Aug 2008 14:36:49 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7NEaiWx006724 for ; Sat, 23 Aug 2008 07:36:46 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWuEO-0004F6-Hl for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 10:36:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWuEN-0004Es-RX for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 10:36:44 -0400 Received: from [199.232.76.173] (port=58186 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWuEN-0004Ep-MG for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 10:36:43 -0400 Received: from mtaout4.012.net.il ([84.95.2.10]:40483) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KWuEN-0005fF-2o for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 10:36:43 -0400 Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout4.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K62000SU4QX4Z51@i_mtaout4.012.net.il> for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 17:11:22 +0300 (IDT) Date: Sat, 23 Aug 2008 17:10:50 +0300 From: Eli Zaretskii Subject: Re: bug#766: 23.0.60; interesting warning during compilation In-reply-to: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> X-012-Sender: halo1@inter.net.il To: Peter Dyballa , 766@debbugs.gnu.org Cc: bug-gnu-emacs@gnu.org Reply-to: Eli Zaretskii Message-id: References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> X-detected-kernel: by monty-python.gnu.org: Solaris 9.1 > From: Peter Dyballa > Date: Sat, 23 Aug 2008 11:00:28 +0200 > Cc: > > The warning from gcc 4.0.1 is: > > dired.c:1003: warning: right shift count >= width of type > > /* To allow inode numbers beyond 32 bits, separate into 2 24-bit > high parts and a 16-bit bottom part. */ > EMACS_INT high_ino = s.st_ino >> 32; > EMACS_INT low_ino = s.st_ino & 0xffffffff; This happens on any system whose st_ino is 32 bits or less, because this code needs to cater to systems whose st_ino is wider than 32 bits. If someone has suggestions how to avoid this warning without making code ugly and unreadable, and preferably without system-dependent #ifdef's, I'm all ears. From Peter_Dyballa@Freenet.DE Sat Aug 23 07:58:42 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Aug 2008 14:58:42 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7NEwdNb013112 for ; Sat, 23 Aug 2008 07:58:41 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWuZb-0006J6-M9 for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 10:58:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWuZX-0006IF-VG for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 10:58:39 -0400 Received: from [199.232.76.173] (port=34914 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWuZX-0006I8-QC for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 10:58:35 -0400 Received: from mout1.freenet.de ([195.4.92.91]:37672) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KWuZS-0000Zy-O2; Sat, 23 Aug 2008 10:58:31 -0400 Received: from [195.4.92.24] (helo=14.mx.freenet.de) by mout1.freenet.de with esmtpa (ID peter_dyballa@freenet.de) (port 25) (Exim 4.69 #65) id 1KWuZQ-0007sC-Dt; Sat, 23 Aug 2008 16:58:28 +0200 Received: from p5b23ce2f.dip.t-dialin.net ([91.35.206.47]:56615 helo=[192.168.1.2]) by 14.mx.freenet.de with esmtpsa (ID peter_dyballa@freenet.de) (TLSv1:AES128-SHA:128) (port 25) (Exim 4.69 #12) id 1KWuZQ-0007ld-70; Sat, 23 Aug 2008 16:58:28 +0200 In-Reply-To: References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes; format=flowed Message-Id: Cc: 766@debbugs.gnu.org, bug-gnu-emacs@gnu.org Content-Transfer-Encoding: quoted-printable From: Peter Dyballa Subject: Re: bug#766: 23.0.60; interesting warning during compilation Date: Sat, 23 Aug 2008 16:58:20 +0200 To: Eli Zaretskii X-Mailer: Apple Mail (2.753.1) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-CrossAssassin-Score: 2 Am 23.08.2008 um 16:10 schrieb Eli Zaretskii: > This happens on any system whose st_ino is 32 bits or less, because > this code needs to cater to systems whose st_ino is wider than 32 > bits. Could it work to type-cast the variable first into a type wider than =20 32 bits? -- Greetings Pete No project was ever completed on time and within budget. =96 Cheops Law From schwab@suse.de Sat Aug 23 10:33:37 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Aug 2008 17:33:37 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7NHXYfi030780 for ; Sat, 23 Aug 2008 10:33:35 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWwzV-0004xZ-K8 for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 13:33:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWwzT-0004ve-DR for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 13:33:32 -0400 Received: from [199.232.76.173] (port=49928 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWwzT-0004vN-6F for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 13:33:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:47828) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KWwzO-0006an-B2; Sat, 23 Aug 2008 13:33:26 -0400 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 05AD545DA7; Sat, 23 Aug 2008 19:33:23 +0200 (CEST) From: Andreas Schwab To: Eli Zaretskii Cc: 766@debbugs.gnu.org, Peter Dyballa , bug-gnu-emacs@gnu.org Subject: Re: bug#766: 23.0.60; interesting warning during compilation References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> X-Yow: We are now enjoying total mutual interaction in an imaginary hot tub... Date: Sat, 23 Aug 2008 19:33:22 +0200 In-Reply-To: (Eli Zaretskii's message of "Sat, 23 Aug 2008 17:10:50 +0300") Message-ID: User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 Eli Zaretskii writes: > If someone has suggestions how to avoid this warning without making > code ugly and unreadable, and preferably without system-dependent > #ifdef's, I'm all ears. EMACS_INT high_ino =3D s.st_ino >> 31 >> 1; Andreas. --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED= 5 "And now for something completely different." From eliz@gnu.org Sat Aug 23 10:34:33 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Aug 2008 17:34:33 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7NHYUvj030867 for ; Sat, 23 Aug 2008 10:34:31 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWx0P-0006LE-U0 for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 13:34:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWx0P-0006Ji-48 for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 13:34:29 -0400 Received: from [199.232.76.173] (port=50001 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWx0O-0006JZ-Vr for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 13:34:29 -0400 Received: from mtaout5.012.net.il ([84.95.2.13]:16614) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KWx0O-0006wr-S7 for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 13:34:29 -0400 Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6200L3OE6AXGB1@i_mtaout5.012.net.il> for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 20:34:58 +0300 (IDT) Date: Sat, 23 Aug 2008 20:34:27 +0300 From: Eli Zaretskii Subject: Re: bug#766: 23.0.60; interesting warning during compilation In-reply-to: X-012-Sender: halo1@inter.net.il To: Peter Dyballa Cc: 766@debbugs.gnu.org, bug-gnu-emacs@gnu.org Reply-to: Eli Zaretskii Message-id: References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> X-detected-kernel: by monty-python.gnu.org: Solaris 9.1 > Cc: 766@emacsbugs.donarmstrong.com, > bug-gnu-emacs@gnu.org > From: Peter Dyballa > Date: Sat, 23 Aug 2008 16:58:20 +0200 > > Could it work to type-cast the variable first into a type wider than > 32 bits? It could, if we could be sure that 64-bit wide integer types are supported on all platforms. I don't know if they are; does anyone know? (It looks like we use "long long" etc. vary sparingly and only on platform-specific files, where there's no problem knowing whether it is supported.) From eliz@gnu.org Sat Aug 23 11:18:27 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.1 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW,RCVD_IN_NIX1 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Aug 2008 18:18:27 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7NIIN5C013114 for ; Sat, 23 Aug 2008 11:18:24 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWxgs-0001Us-F6 for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 14:18:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWxgr-0001Tx-Ih for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 14:18:21 -0400 Received: from [199.232.76.173] (port=38377 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWxgr-0001To-8P for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 14:18:21 -0400 Received: from mtaout4.012.net.il ([84.95.2.10]:39967) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KWxgq-0006CF-Sq for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 14:18:21 -0400 Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout4.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K62000O4G7E4ZW1@i_mtaout4.012.net.il> for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 21:18:51 +0300 (IDT) Date: Sat, 23 Aug 2008 21:18:19 +0300 From: Eli Zaretskii Subject: Re: bug#766: 23.0.60; interesting warning during compilation In-reply-to: X-012-Sender: halo1@inter.net.il To: Andreas Schwab Cc: 766@debbugs.gnu.org, Peter_Dyballa@Freenet.DE, bug-gnu-emacs@gnu.org Reply-to: Eli Zaretskii Message-id: References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> X-detected-kernel: by monty-python.gnu.org: Solaris 9.1 > From: Andreas Schwab > Cc: 766@emacsbugs.donarmstrong.com, > Peter Dyballa , bug-gnu-emacs@gnu.org > Date: Sat, 23 Aug 2008 19:33:22 +0200 > > Eli Zaretskii writes: > > > If someone has suggestions how to avoid this warning without making > > code ugly and unreadable, and preferably without system-dependent > > #ifdef's, I'm all ears. > > EMACS_INT high_ino = s.st_ino >> 31 >> 1; Thanks. Can we be reasonably sure that GCC will not become smart enough some day to flag this as well? From schwab@suse.de Sat Aug 23 11:56:58 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Aug 2008 18:56:58 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7NIutXn025352 for ; Sat, 23 Aug 2008 11:56:56 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWyIA-00018G-RZ for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 14:56:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWyI8-00017K-0h for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 14:56:54 -0400 Received: from [199.232.76.173] (port=51363 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWyI7-00017A-SW for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 14:56:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:54913) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KWyI2-0003iy-Gq; Sat, 23 Aug 2008 14:56:46 -0400 Received: from Relay2.suse.de (relay-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 80C6045FE2; Sat, 23 Aug 2008 20:56:44 +0200 (CEST) From: Andreas Schwab To: Eli Zaretskii Cc: 766@debbugs.gnu.org, Peter_Dyballa@Freenet.DE, bug-gnu-emacs@gnu.org Subject: Re: bug#766: 23.0.60; interesting warning during compilation References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> X-Yow: Are we on STRIKE yet? Date: Sat, 23 Aug 2008 20:56:38 +0200 In-Reply-To: (Eli Zaretskii's message of "Sat, 23 Aug 2008 21:18:19 +0300") Message-ID: User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 Eli Zaretskii writes: >> From: Andreas Schwab >> EMACS_INT high_ino =3D s.st_ino >> 31 >> 1; > > Thanks. Can we be reasonably sure that GCC will not become smart > enough some day to flag this as well? What do you mean with "smart enough"? There is nothing to flag here. Andreas. --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED= 5 "And now for something completely different." From eliz@gnu.org Sat Aug 23 12:06:18 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW,RCVD_IN_NIX1 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Aug 2008 19:06:18 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7NJ6Fg7029170 for ; Sat, 23 Aug 2008 12:06:16 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWyRD-0004Wu-55 for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 15:06:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWyRC-0004WG-A5 for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 15:06:14 -0400 Received: from [199.232.76.173] (port=59867 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWyRC-0004WB-60 for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 15:06:14 -0400 Received: from mtaout2.012.net.il ([84.95.2.4]:60100) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KWyRB-00064e-KV for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 15:06:13 -0400 Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K62008BSIF706H0@i_mtaout2.012.net.il> for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 22:06:44 +0300 (IDT) Date: Sat, 23 Aug 2008 22:06:12 +0300 From: Eli Zaretskii Subject: Re: bug#766: 23.0.60; interesting warning during compilation In-reply-to: X-012-Sender: halo1@inter.net.il To: Andreas Schwab Cc: 766@debbugs.gnu.org, Peter_Dyballa@Freenet.DE, bug-gnu-emacs@gnu.org Reply-to: Eli Zaretskii Message-id: References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> X-detected-kernel: by monty-python.gnu.org: Solaris 9.1 > From: Andreas Schwab > Cc: 766@emacsbugs.donarmstrong.com, Peter_Dyballa@Freenet.DE, > bug-gnu-emacs@gnu.org > Date: Sat, 23 Aug 2008 20:56:38 +0200 > > Eli Zaretskii writes: > > >> From: Andreas Schwab > >> EMACS_INT high_ino = s.st_ino >> 31 >> 1; > > > > Thanks. Can we be reasonably sure that GCC will not become smart > > enough some day to flag this as well? > > What do you mean with "smart enough"? Maybe that was a polite way of saying "silly enough". > There is nothing to flag here. I meant the warning about shifting by too many bits. 31+1 = 32, and even a compiler can realize that. Please don't get me wrong: I will gladly make the change as you suggested, I just don't want us to bump into this again a few GCC upgrades down the road. From schwab@suse.de Sat Aug 23 13:03:44 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Aug 2008 20:03:44 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7NK3faF014055 for ; Sat, 23 Aug 2008 13:03:42 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWzKn-00036k-7d for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 16:03:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWzKl-000361-Pk for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 16:03:40 -0400 Received: from [199.232.76.173] (port=38434 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWzKl-00035t-Kf for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 16:03:39 -0400 Received: from mx2.suse.de ([195.135.220.15]:33101) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KWzKf-0001Y1-IE; Sat, 23 Aug 2008 16:03:33 -0400 Received: from Relay2.suse.de (relay-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id C3A0845E45; Sat, 23 Aug 2008 22:03:31 +0200 (CEST) From: Andreas Schwab To: Eli Zaretskii Cc: 766@debbugs.gnu.org, Peter_Dyballa@Freenet.DE, bug-gnu-emacs@gnu.org Subject: Re: bug#766: 23.0.60; interesting warning during compilation References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> X-Yow: Why is everything made of Lycra Spandex? Date: Sat, 23 Aug 2008 22:03:31 +0200 In-Reply-To: (Eli Zaretskii's message of "Sat, 23 Aug 2008 22:06:12 +0300") Message-ID: User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 Eli Zaretskii writes: > I meant the warning about shifting by too many bits. 31+1 =3D 32, and > even a compiler can realize that. That's not how the shift operator is defined. Andreas. --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED= 5 "And now for something completely different." From eliz@gnu.org Sat Aug 23 13:50:24 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW,RCVD_IN_NIX1 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Aug 2008 20:50:25 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7NKoLMZ029797 for ; Sat, 23 Aug 2008 13:50:23 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KX03x-0001DN-G3 for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 16:50:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KX03w-0001Cz-QW for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 16:50:20 -0400 Received: from [199.232.76.173] (port=54839 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KX03w-0001Cw-Ll for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 16:50:20 -0400 Received: from mtaout3.012.net.il ([84.95.2.7]:14439) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KX03w-0001xE-4o for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 16:50:20 -0400 Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K62009UEN8P0SW1@i_mtaout3.012.net.il> for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 23:50:50 +0300 (IDT) Date: Sat, 23 Aug 2008 23:50:18 +0300 From: Eli Zaretskii Subject: Re: bug#766: 23.0.60; interesting warning during compilation In-reply-to: X-012-Sender: halo1@inter.net.il To: Andreas Schwab Cc: 766@debbugs.gnu.org, Peter_Dyballa@Freenet.DE, bug-gnu-emacs@gnu.org Reply-to: Eli Zaretskii Message-id: References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> X-detected-kernel: by monty-python.gnu.org: Solaris 9.1 > From: Andreas Schwab > Cc: 766@emacsbugs.donarmstrong.com, Peter_Dyballa@Freenet.DE, > bug-gnu-emacs@gnu.org > Date: Sat, 23 Aug 2008 22:03:31 +0200 > > Eli Zaretskii writes: > > > I meant the warning about shifting by too many bits. 31+1 = 32, and > > even a compiler can realize that. > > That's not how the shift operator is defined. Andreas, it's late and I'm tired. Could you please answer my question, which is: what is the danger, if any, that GCC in some future version will produce the same warning for the code you suggested? Thanks in advance. From Peter_Dyballa@Freenet.DE Sat Aug 23 15:23:47 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.0 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Aug 2008 22:23:47 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7NMNiKx027347 for ; Sat, 23 Aug 2008 15:23:45 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KX1WJ-0007zr-SY for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 18:23:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KX1WH-0007zd-IR for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 18:23:42 -0400 Received: from [199.232.76.173] (port=52710 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KX1WH-0007za-DC for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 18:23:41 -0400 Received: from mout4.freenet.de ([195.4.92.94]:53572) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KX1WC-0002XP-9P; Sat, 23 Aug 2008 18:23:36 -0400 Received: from [195.4.92.19] (helo=9.mx.freenet.de) by mout4.freenet.de with esmtpa (ID peter_dyballa@freenet.de) (port 25) (Exim 4.69 #19) id 1KX1WA-0005mU-5R; Sun, 24 Aug 2008 00:23:34 +0200 Received: from p5b23c6e0.dip.t-dialin.net ([91.35.198.224]:56776 helo=[192.168.1.2]) by 9.mx.freenet.de with esmtpsa (ID peter_dyballa@freenet.de) (TLSv1:AES128-SHA:128) (port 25) (Exim 4.69 #12) id 1KX1W9-0007Gy-Tl; Sun, 24 Aug 2008 00:23:34 +0200 In-Reply-To: References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <904AC839-3CCF-4AE3-956D-D482B0EE1955@Freenet.DE> Cc: 766@debbugs.gnu.org, bug-gnu-emacs@gnu.org Content-Transfer-Encoding: 7bit From: Peter Dyballa Subject: Re: bug#766: 23.0.60; interesting warning during compilation Date: Sun, 24 Aug 2008 00:23:29 +0200 To: Eli Zaretskii X-Mailer: Apple Mail (2.753.1) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-CrossAssassin-Score: 2 Am 23.08.2008 um 19:34 schrieb Eli Zaretskii: >> Could it work to type-cast the variable first into a type wider than >> 32 bits? > > It could, if we could be sure that 64-bit wide integer types are > supported on all platforms. I don't know if they are; does anyone > know? There aren't so many (elderly) systems left ... Besides, isn't the long long, a data type of at least 64 bits, defined in C, ANSI C99 to be exact? Actually, I think, it's sad that no compiler needs to follow this option! Another option is to check whether the size of the variable is bigger than four bytes. -- Greetings Pete Rain is saved up in cloud banks. From schwab@suse.de Sat Aug 23 16:13:08 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Aug 2008 23:13:09 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7NND5I8011128 for ; Sat, 23 Aug 2008 16:13:07 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KX2I5-0005la-FA for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 19:13:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KX2I4-0005lN-1k for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 19:13:05 -0400 Received: from [199.232.76.173] (port=54039 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KX2I3-0005lK-RZ for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 19:13:03 -0400 Received: from ns.suse.de ([195.135.220.2]:43101 helo=mx1.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KX2Hy-00028x-Lr; Sat, 23 Aug 2008 19:12:58 -0400 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 7069C419E0; Sun, 24 Aug 2008 01:12:56 +0200 (CEST) From: Andreas Schwab To: Eli Zaretskii Cc: 766@debbugs.gnu.org, Peter_Dyballa@Freenet.DE, bug-gnu-emacs@gnu.org Subject: Re: bug#766: 23.0.60; interesting warning during compilation References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> X-Yow: I Know A Joke Date: Sun, 24 Aug 2008 01:12:55 +0200 In-Reply-To: (Eli Zaretskii's message of "Sat, 23 Aug 2008 23:50:18 +0300") Message-ID: User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 Eli Zaretskii writes: > Andreas, it's late and I'm tired. Could you please answer my > question, which is: what is the danger, if any, that GCC in some > future version will produce the same warning for the code you > suggested? I have already answered that question. Andreas. --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED= 5 "And now for something completely different." From eliz@gnu.org Sat Aug 23 20:13:18 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW,RCVD_IN_NIX1 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 24 Aug 2008 03:13:18 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7O3DFEX023466 for ; Sat, 23 Aug 2008 20:13:16 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KX62U-0004LY-Pi for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 23:13:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KX62U-0004LD-6N for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 23:13:14 -0400 Received: from [199.232.76.173] (port=34794 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KX62U-0004LA-0B for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 23:13:14 -0400 Received: from mtaout2.012.net.il ([84.95.2.4]:23330) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KX62T-0002to-LT for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 23:13:13 -0400 Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6300ME94YVVE40@i_mtaout2.012.net.il> for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2008 06:13:43 +0300 (IDT) Date: Sun, 24 Aug 2008 06:13:12 +0300 From: Eli Zaretskii Subject: Re: bug#766: 23.0.60; interesting warning during compilation In-reply-to: <904AC839-3CCF-4AE3-956D-D482B0EE1955@Freenet.DE> X-012-Sender: halo1@inter.net.il To: Peter Dyballa Cc: 766@debbugs.gnu.org, bug-gnu-emacs@gnu.org Reply-to: Eli Zaretskii Message-id: References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> <904AC839-3CCF-4AE3-956D-D482B0EE1955@Freenet.DE> X-detected-kernel: by monty-python.gnu.org: Solaris 9.1 > Cc: 766@emacsbugs.donarmstrong.com, > bug-gnu-emacs@gnu.org > From: Peter Dyballa > Date: Sun, 24 Aug 2008 00:23:29 +0200 > > Another option is to check whether the size of the variable is bigger > than four bytes. If you mean with sizeof, then the problem is that sizeof is not a preprocessing-time operator, so it cannot prevent the compiler from seeing the offending code. From eliz@gnu.org Sat Aug 23 20:15:04 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW,RCVD_IN_NIX1 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 24 Aug 2008 03:15:04 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7O3F0uC023560 for ; Sat, 23 Aug 2008 20:15:01 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KX64B-0004f9-M8 for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 23:14:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KX64B-0004ex-81 for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 23:14:59 -0400 Received: from [199.232.76.173] (port=34823 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KX64B-0004eu-2H for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 23:14:59 -0400 Received: from mtaout2.012.net.il ([84.95.2.4]:23564) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KX64A-00037h-MM for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 23:14:58 -0400 Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6300MO151TVE40@i_mtaout2.012.net.il> for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2008 06:15:30 +0300 (IDT) Date: Sun, 24 Aug 2008 06:14:58 +0300 From: Eli Zaretskii Subject: Re: bug#766: 23.0.60; interesting warning during compilation In-reply-to: X-012-Sender: halo1@inter.net.il To: Andreas Schwab Cc: 766@debbugs.gnu.org, Peter_Dyballa@Freenet.DE, bug-gnu-emacs@gnu.org Reply-to: Eli Zaretskii Message-id: References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> X-detected-kernel: by monty-python.gnu.org: Solaris 9.1 X-CrossAssassin-Score: 2 > From: Andreas Schwab > Cc: 766@emacsbugs.donarmstrong.com, Peter_Dyballa@Freenet.DE, > bug-gnu-emacs@gnu.org > Date: Sun, 24 Aug 2008 01:12:55 +0200 > > Eli Zaretskii writes: > > > Andreas, it's late and I'm tired. Could you please answer my > > question, which is: what is the danger, if any, that GCC in some > > future version will produce the same warning for the code you > > suggested? > > I have already answered that question. In that case, I didn't understand it. Just for me, could you please translate it into a simple YES or NO: is there a danger that GCC will in the future produce the same warning for your suggested code? Thanks. From Peter_Dyballa@Freenet.DE Sun Aug 24 00:30:29 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.1 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 24 Aug 2008 07:30:29 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7O7UPdM009084 for ; Sun, 24 Aug 2008 00:30:27 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXA3N-0002im-Fk for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2008 03:30:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXA3K-0002gH-SC for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2008 03:30:25 -0400 Received: from [199.232.76.173] (port=58366 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXA3K-0002g3-BG for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2008 03:30:22 -0400 Received: from mx20.gnu.org ([199.232.41.8]:51158) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KXA3F-00060I-0A; Sun, 24 Aug 2008 03:30:17 -0400 Received: from mout1.freenet.de ([195.4.92.91]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KXA0Q-0000Zz-Bj; Sun, 24 Aug 2008 03:27:22 -0400 Received: from [195.4.92.10] (helo=0.mx.freenet.de) by mout1.freenet.de with esmtpa (ID peter_dyballa@freenet.de) (port 25) (Exim 4.69 #65) id 1KXA0N-0000YR-5u; Sun, 24 Aug 2008 09:27:19 +0200 Received: from p5b23eace.dip.t-dialin.net ([91.35.234.206]:57058 helo=[192.168.1.2]) by 0.mx.freenet.de with esmtpsa (ID peter_dyballa@freenet.de) (TLSv1:AES128-SHA:128) (port 25) (Exim 4.69 #12) id 1KXA0M-0006Lw-St; Sun, 24 Aug 2008 09:27:19 +0200 In-Reply-To: References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> <904AC839-3CCF-4AE3-956D-D482B0EE1955@Freenet.DE> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes; format=flowed Message-Id: <6B6799DA-F80E-4B4F-A102-F9EBDA5CDA9F@Freenet.DE> Cc: 766@debbugs.gnu.org, bug-gnu-emacs@gnu.org Content-Transfer-Encoding: quoted-printable From: Peter Dyballa Subject: Re: bug#766: 23.0.60; interesting warning during compilation Date: Sun, 24 Aug 2008 09:27:16 +0200 To: Eli Zaretskii X-Mailer: Apple Mail (2.753.1) X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-CrossAssassin-Score: 2 Am 24.08.2008 um 05:13 schrieb Eli Zaretskii: > If you mean with sizeof, then the problem is that sizeof is not a > preprocessing-time operator, so it cannot prevent the compiler from > seeing the offending code. You mean if (sizeof (s.st_ino) > 4) introducing the shift operation will fail to keep the compiler from =20 emitting the warning? Anyway, I think Andreas Schwab's proposition to split the one wide =20 shift into two shorter ones is better. And the original code relies =20 on an undefined behaviour of every compiler, which might change. -- Greetings Pete No project was ever completed on time and within budget. =96 Cheops Law From eliz@gnu.org Sun Aug 24 11:12:08 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW,RCVD_IN_NIX1 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 24 Aug 2008 18:12:08 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7OIC525022023 for ; Sun, 24 Aug 2008 11:12:06 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXK4L-000333-48 for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2008 14:12:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXK4J-00032W-W8 for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2008 14:12:04 -0400 Received: from [199.232.76.173] (port=51422 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXK4J-00032S-RH for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2008 14:12:03 -0400 Received: from mtaout3.012.net.il ([84.95.2.7]:31875) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KXK4J-0003KE-Ey for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2008 14:12:03 -0400 Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6400FDKAKXATI1@i_mtaout3.012.net.il> for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2008 21:12:34 +0300 (IDT) Date: Sun, 24 Aug 2008 21:12:02 +0300 From: Eli Zaretskii Subject: Re: bug#766: 23.0.60; interesting warning during compilation In-reply-to: <6B6799DA-F80E-4B4F-A102-F9EBDA5CDA9F@Freenet.DE> X-012-Sender: halo1@inter.net.il To: Peter Dyballa Cc: 766@debbugs.gnu.org, bug-gnu-emacs@gnu.org Reply-to: Eli Zaretskii Message-id: References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> <904AC839-3CCF-4AE3-956D-D482B0EE1955@Freenet.DE> <6B6799DA-F80E-4B4F-A102-F9EBDA5CDA9F@Freenet.DE> X-detected-kernel: by monty-python.gnu.org: Solaris 9.1 > Cc: 766@emacsbugs.donarmstrong.com, > bug-gnu-emacs@gnu.org > From: Peter Dyballa > Date: Sun, 24 Aug 2008 09:27:16 +0200 > > > Am 24.08.2008 um 05:13 schrieb Eli Zaretskii: > > > If you mean with sizeof, then the problem is that sizeof is not a > > preprocessing-time operator, so it cannot prevent the compiler from > > seeing the offending code. > > You mean > > if (sizeof (s.st_ino) > 4) > > introducing the shift operation will fail to keep the compiler from > emitting the warning? Yes, it will fail. Please try compiling this toy program on a 32-bit machine, and you will see the same warning. int foo (int a) { if (sizeof (a) > 4) return a >> 32; else return 0; } > Anyway, I think Andreas Schwab's proposition to split the one wide > shift into two shorter ones is better. I agree, I just wanted to be sure that this won't bring the same warning back at some future time. From cyd@stupidchicken.com Wed Aug 27 12:04:12 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 766-done) by emacsbugs.donarmstrong.com; 27 Aug 2008 19:04:12 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7RJ49bH017366 for <766-done@emacsbugs.donarmstrong.com>; Wed, 27 Aug 2008 12:04:10 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 08F1957E14C; Wed, 27 Aug 2008 15:05:59 -0400 (EDT) From: Chong Yidong To: 766-done@debbugs.gnu.org Subject: Re: bug#766: 23.0.60; interesting warning during compilation Date: Wed, 27 Aug 2008 15:05:59 -0400 Message-ID: <87k5e2uvl4.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I've checked in Andreas' fix. From monnier@IRO.UMontreal.CA Wed Sep 3 11:47:49 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 3 Sep 2008 18:47:49 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83IlifA032302 for ; Wed, 3 Sep 2008 11:47:47 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KaxOJ-0001hx-TO for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2008 14:47:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KaxOH-0001gX-HU for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2008 14:47:42 -0400 Received: from [199.232.76.173] (port=39630 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KaxOH-0001gR-6X for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2008 14:47:41 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:51359) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KaxO9-00050E-2g; Wed, 03 Sep 2008 14:47:33 -0400 Received: from alfajor.home (vpn-132-204-232-121.acd.umontreal.ca [132.204.232.121]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m83Ilh5d030089; Wed, 3 Sep 2008 14:47:43 -0400 Received: by alfajor.home (Postfix, from userid 20848) id 4AA861C971; Wed, 3 Sep 2008 14:47:14 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Cc: 766@debbugs.gnu.org, Andreas Schwab , bug-gnu-emacs@gnu.org, Peter_Dyballa@Freenet.DE Subject: Re: bug#766: 23.0.60; interesting warning during compilation Message-ID: References: <4762603A-B23E-454E-A43C-422DE5036DC4@Freenet.DE> Date: Wed, 03 Sep 2008 14:47:14 -0400 In-Reply-To: (Eli Zaretskii's message of "Sat, 23 Aug 2008 21:18:19 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3096=0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-CrossAssassin-Score: 2 >> > If someone has suggestions how to avoid this warning without making >> > code ugly and unreadable, and preferably without system-dependent >> > #ifdef's, I'm all ears. >> >> EMACS_INT high_ino = s.st_ino >> 31 >> 1; > Thanks. Can we be reasonably sure that GCC will not become smart > enough some day to flag this as well? I don't think anybody can guarantee it, but usually it's a bad idea to output warnings about post-optimization code, so you may hope that GCC will optimize "x >> 31 >> 1" to "x >> 32" without ever outputing a warning about the silliness of the end result. Then again, the present code shows that even outputting a warning about "x >> 32" is already borderline annoying, so there's no guarantee gcc won't become more annoying in the future. Stefan From unknown Thu Aug 14 21:49:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Thu, 02 Oct 2008 14:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator