From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: FIXNUM_OVERFLOW_P on amd64 Date: Mon, 04 Dec 2006 10:01:59 -0500 Message-ID: References: NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165244613 21681 80.91.229.10 (4 Dec 2006 15:03:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 4 Dec 2006 15:03:33 +0000 (UTC) Cc: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 04 16:03:31 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GrFLq-00084I-PV for ged-emacs-devel@m.gmane.org; Mon, 04 Dec 2006 16:03:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GrFLq-0005K0-NQ for ged-emacs-devel@m.gmane.org; Mon, 04 Dec 2006 10:03:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GrFKb-0004Vq-3m for emacs-devel@gnu.org; Mon, 04 Dec 2006 10:02:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GrFKX-0004T7-UT for emacs-devel@gnu.org; Mon, 04 Dec 2006 10:02:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GrFKX-0004Su-BD for emacs-devel@gnu.org; Mon, 04 Dec 2006 10:02:05 -0500 Original-Received: from [209.226.175.25] (helo=tomts5-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GrFKT-0001L1-1r; Mon, 04 Dec 2006 10:02:01 -0500 Original-Received: from pastel.home ([74.13.164.204]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20061204150159.LDIE5067.tomts5-srv.bellnexxia.net@pastel.home>; Mon, 4 Dec 2006 10:01:59 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 8B7F88D3A; Mon, 4 Dec 2006 10:01:59 -0500 (EST) Original-To: Francesco Potorti` In-Reply-To: (Francesco Potorti`'s message of "Mon\, 04 Dec 2006 12\:48\:39 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:63270 Archived-At: > gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -I. -I/home/pot/gnu/emacs-22.0.91/src -D_BSD_SOURCE -g -O2 -Wno-pointer-sign editfns.c > editfns.c: In function 'Fuser_uid': > editfns.c:1317: warning: comparison is always false due to limited range of data type > editfns.c:1317: warning: comparison is always false due to limited range of data type [...] > So the problem apparently is that gcc realises that taking geteuid(), > stretching it to long and then comparing it with something bigger that > what geteuid() possibly can be is a no-op. This is what is intended, in > fact. To remove the warning, I tried to change the definition of > FIXNUM_OVERFLOW_P in lisp.h by adding a precondition like this: This warning is clearly wrong. The same problem happens at various places with SINGLE_BYTE_P which is sometimes called from a macro at spots where we happen to always know that the char is < 256 (for example). The problem is that such constant expressions are sometimes an indication of a programming bug, but they can also be the result of very good coding practices, where you want to let the compiler do the optimization. Stefan