From owner-freebsd-hackers@FreeBSD.ORG Thu May 1 18:18:08 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DFC137B401; Thu, 1 May 2003 18:18:08 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 610EB43FA3; Thu, 1 May 2003 18:18:07 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.8/8.12.3) with ESMTP id h421I6A7012693; Thu, 1 May 2003 19:18:06 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 01 May 2003 19:17:50 -0600 (MDT) Message-Id: <20030501.191750.12268648.imp@bsdimp.com> To: nectar@freebsd.org From: "M. Warner Losh" In-Reply-To: <20030501150713.GA34992@madman.celabo.org> References: <20030501150713.GA34992@madman.celabo.org> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org cc: des@ofug.org Subject: Re: incorrect enum warning? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2003 01:18:08 -0000 In message: <20030501150713.GA34992@madman.celabo.org> "Jacques A. Vidrine" writes: : > when 0x80000000 is clearly within the range of 'int' on all platforms : > we support? : : Guessing: : C does not specify one's complement or two's complement representation : of integers. On a one's complement 32-bit platform, 0x80000000 is -0 : (negative zero), which cannot be an `int'. No. The reason is that 0x800000000 is a positive number that's bigger than MAX_INT (which is 0x7fffffff). It isn't bigger than an unsigned int, but it is larger than an int, but the standard doesn't say 'unsigned int' it says 'int' which implies signed. Warner