From owner-freebsd-current@FreeBSD.ORG Sun Jul 13 12:56:44 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4334537B401 for ; Sun, 13 Jul 2003 12:56:44 -0700 (PDT) Received: from falcon.midgard.homeip.net (h76n3fls20o913.bredband.comhem.se [213.67.148.76]) by mx1.FreeBSD.org (Postfix) with SMTP id 9367543F75 for ; Sun, 13 Jul 2003 12:56:42 -0700 (PDT) (envelope-from ertr1013@student.uu.se) Received: (qmail 17803 invoked by uid 1001); 13 Jul 2003 19:56:41 -0000 Date: Sun, 13 Jul 2003 21:56:41 +0200 From: Erik Trulsson To: "M. Warner Losh" Message-ID: <20030713195640.GA17783@falcon.midgard.homeip.net> Mail-Followup-To: "M. Warner Losh" , leimy2k@mac.com, freebsd-current@freebsd.org References: <1046B4F9-B561-11D7-BE3B-0003937E39E0@mac.com> <20030713190720.GA17305@falcon.midgard.homeip.net> <340CBBD2-B568-11D7-BE3B-0003937E39E0@mac.com> <20030713.134838.39218842.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030713.134838.39218842.imp@bsdimp.com> User-Agent: Mutt/1.5.4i cc: freebsd-current@freebsd.org Subject: Re: GCC 3.3.1, new warnings with X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2003 19:56:44 -0000 On Sun, Jul 13, 2003 at 01:48:38PM -0600, M. Warner Losh wrote: > In message: <340CBBD2-B568-11D7-BE3B-0003937E39E0@mac.com> > David Leimbach writes: > : So for the one way conversion of signed to unsigned it will behave like > : 2's compliment > : all the time. What about back to signed? > > Same way. > > It will be reduced by the maximum value of the range plus one to do > the conversion. No, this case is implementation-defined if the value cannot be represented by the signed type it is converted to. (If it can be represented then the value will be preserved.) > > See section for 6.3.1.3 for the details. Yes, please do. > > That's why I said 'as if' in my other mail. -- Erik Trulsson ertr1013@student.uu.se