From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Windows 64 port Date: Wed, 29 Feb 2012 23:24:42 +0200 Message-ID: <83d38xcoyt.fsf@gnu.org> References: <20120219211800.0000558f@unknown> <834numv7js.fsf@gnu.org> <4F428780.8070902@cs.ucla.edu> <4F4D507F.7030008@cs.ucla.edu> <83obshcy8n.fsf@gnu.org> <4F4E7FE0.9040907@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1330550579 15249 80.91.229.3 (29 Feb 2012 21:22:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 29 Feb 2012 21:22:59 +0000 (UTC) Cc: fabrice.popineau@supelec.fr, emacs-devel@gnu.org, ajmr@ilovetortilladepatatas.com To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 29 22:22:58 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S2qzB-0000OA-P9 for ged-emacs-devel@m.gmane.org; Wed, 29 Feb 2012 22:22:57 +0100 Original-Received: from localhost ([::1]:41439 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2qzA-0006GN-TQ for ged-emacs-devel@m.gmane.org; Wed, 29 Feb 2012 16:22:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:46597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2qz4-0006GH-1z for emacs-devel@gnu.org; Wed, 29 Feb 2012 16:22:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2qyz-0005IV-VS for emacs-devel@gnu.org; Wed, 29 Feb 2012 16:22:49 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:36731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2qyz-0005Ht-N0 for emacs-devel@gnu.org; Wed, 29 Feb 2012 16:22:45 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M0600C00BDD3Q00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Wed, 29 Feb 2012 23:22:34 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.119.92]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M0600967BDL11L1@a-mtaout22.012.net.il>; Wed, 29 Feb 2012 23:22:34 +0200 (IST) In-reply-to: <4F4E7FE0.9040907@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148842 Archived-At: > Date: Wed, 29 Feb 2012 11:43:28 -0800 > From: Paul Eggert > CC: fabrice.popineau@supelec.fr, ajmr@ilovetortilladepatatas.com, > emacs-devel@gnu.org > > >> We don't need to modify the mainline Emacs code in order to > >> pacify third-party compilers that issue incorrect warnings. > > > > What is incorrect about that warning? > > As Fabrice explained, the warning is about code that is never executed > on his platform, because it's inside a conditional that is always > false, and so the bug cannot possibly occur. > > The conditional itself is a constant, and decent compiler > will optimize away the code in question. The conditional is present > precisely to avoid the overflow that the compiler is mistakenly warning > about. There is no easy way to rewrite the code that will both > pacify the broken compiler and keep the code modular and portable. Thanks for explaining this. > > If some compiler tells us something valuable about the code, we > > need not ignore it just because it's "third-party". > > True, but it appears that many of the fixes in his patch are to > pacify warnings like the above. Which ones are those? I see many changes that qualify existing declarations with `const', which cannot possibly be wrong. I also see replacements of `unsigned long' with a `size_t', which cannot be wrong, either. Using ptrdiff_t instead of long or some such is required for LLP64 platforms. Most of the rest is in Windows-specific files. So which fixes are for the bogus warnings?