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 20:04:24 +0200 Message-ID: <83obshcy8n.fsf@gnu.org> References: <20120219211800.0000558f@unknown> <834numv7js.fsf@gnu.org> <4F428780.8070902@cs.ucla.edu> <4F4D507F.7030008@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1330538589 14942 80.91.229.3 (29 Feb 2012 18:03:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 29 Feb 2012 18:03:09 +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 19:03:08 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 1S2nrl-0004VC-49 for ged-emacs-devel@m.gmane.org; Wed, 29 Feb 2012 19:03:05 +0100 Original-Received: from localhost ([::1]:33616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2nrk-0007Tk-GG for ged-emacs-devel@m.gmane.org; Wed, 29 Feb 2012 13:03:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2nrc-0007TN-7k for emacs-devel@gnu.org; Wed, 29 Feb 2012 13:03:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2nrR-0007xX-Or for emacs-devel@gnu.org; Wed, 29 Feb 2012 13:02:55 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:54449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2nrR-0007xP-Gf for emacs-devel@gnu.org; Wed, 29 Feb 2012 13:02:45 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M0600A00226MM00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Wed, 29 Feb 2012 20:02:17 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.119.92]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M060070N23R3Z41@a-mtaout22.012.net.il>; Wed, 29 Feb 2012 20:02:17 +0200 (IST) In-reply-to: <4F4D507F.7030008@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:148838 Archived-At: > Date: Tue, 28 Feb 2012 14:09:03 -0800 > From: Paul Eggert > CC: Eli Zaretskii , AJMR , > emacs-devel@gnu.org > > > In src/dispnew.c:6402, height and width should probably be unsigned. The > > checking by > > INT_ADD_RANGE_OVERFLOW results in a compiler warning about integral > > constant overflow > > because it tries to compute (INTMIN - 2) which obviously is out of range. > > The value is not used in this case, but the compiler may emit the warning > > anyway. > > 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? Did Fabrice describe the issue incorrectly? If so, would you mind explaining where his reasoning about the validity of INT_MIN - 2 was wrong? > We can safely ignore these warnings and leave the code alone. We don't need to, but we might consider that anyway. If some compiler tells us something valuable about the code, we need not ignore it just because it's "third-party". My experience is similar to that of Fabrice: compiling a program with several different compilers helps find more problematic, unclean, and unsafe code. I'm quite sure I saw this advice in some textbooks.