From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Preventing warnings in FIXNUM_OVERFLOW_P Date: Fri, 19 Jan 2007 05:42:47 -0500 Message-ID: References: <85lkk0npzj.fsf@lola.goethe.zz> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1169203973 21855 80.91.229.12 (19 Jan 2007 10:52:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 19 Jan 2007 10:52:53 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 19 11:52:51 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H7rMS-0000SS-5V for ged-emacs-devel@m.gmane.org; Fri, 19 Jan 2007 11:52:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7rMR-00021v-QO for ged-emacs-devel@m.gmane.org; Fri, 19 Jan 2007 05:52:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7rDZ-0002SQ-Rn for emacs-devel@gnu.org; Fri, 19 Jan 2007 05:43:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7rDZ-0002Ry-0B for emacs-devel@gnu.org; Fri, 19 Jan 2007 05:43:33 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7rDX-0002RT-HA for emacs-devel@gnu.org; Fri, 19 Jan 2007 05:43:31 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H7rDW-0006D4-Rl for emacs-devel@gnu.org; Fri, 19 Jan 2007 05:43:31 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1H7rCp-0001at-Mr; Fri, 19 Jan 2007 05:42:47 -0500 Original-To: David Kastrup In-reply-to: <85lkk0npzj.fsf@lola.goethe.zz> (message from David Kastrup on Thu, 18 Jan 2007 19:34:24 +0100) 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:65296 Archived-At: > #define FIXNUM_OVERFLOW_P(i) \ > ((unsigned long long)(i) > MOST_POSITIVE_FIXNUM \ > && (unsigned long long)(i) < MOST_NEGATIVE_FIXNUM) > > Would someone please give that approach a try and see if it works? I > am having too much trouble with concentration right now to see whether > that code is correct -- it might need somewhat more change than that > in order to get the comparisons right in an unsigned type. unsigned long long is neither guaranteed to exist on all supported architectures, nor guaranteed to be longer than long. `unsigned long long' does always exist, when you are using GCC. The definition could be conditional on __GNUC__. As for the whether `unsigned long long' may not be longer than `long', why does that matter?