From owner-svn-src-head@freebsd.org Tue Sep 22 17:46:34 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C21BFA06F99; Tue, 22 Sep 2015 17:46:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F4FA11D3; Tue, 22 Sep 2015 17:46:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [10.192.0.157] (unknown [178.20.49.58]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 008D31AA28; Tue, 22 Sep 2015 19:46:31 +0200 (CEST) Subject: Re: svn commit: r288099 - head/contrib/binutils/opcodes Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_307ADA36-2350-41FD-898C-A6A18412F133"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5.1 From: Dimitry Andric In-Reply-To: <1442931787.1224.205.camel@freebsd.org> Date: Tue, 22 Sep 2015 19:46:26 +0200 Cc: Slawa Olhovchenkov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201509220935.t8M9ZZfD051027@repo.freebsd.org> <20150922094301.GW3158@zxy.spb.ru> <4CD0DC75-0235-4890-827C-4FF41BBADD8A@FreeBSD.org> <1442931787.1224.205.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 17:46:34 -0000 --Apple-Mail=_307ADA36-2350-41FD-898C-A6A18412F133 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 22 Sep 2015, at 16:23, Ian Lepore wrote: > > On Tue, 2015-09-22 at 11:53 +0200, Dimitry Andric wrote: >> On 22 Sep 2015, at 11:43, Slawa Olhovchenkov wrote: >>> >>> On Tue, Sep 22, 2015 at 09:35:35AM +0000, Dimitry Andric wrote: >> ... >>>> - imm |= (-1 << 7); >>>> + imm |= -(1 << 7); >>> >>> May be (~0 << 7) is more simple to understund? >> >> This will give the same warning. ~0 will implicitly convert to -1. >> >> (It would be better to convert all these masks to unsigned, where such >> shifting is always defined, but that gives a lot more churn.) >> >> -Dimitry >> > > How is (-1U << 7) more churn? For this one line, it isn't, of course. Writing -(1 << 7) is simply my personal preference, and it matches the type of 'imm'. But what I meant was changing all mask-containing int variables to unsigned, and suffixing all mask literals U, and so on. This is what should have been done by GNU in the first place. :) -Dimitry --Apple-Mail=_307ADA36-2350-41FD-898C-A6A18412F133 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.28 iEYEARECAAYFAlYBk/YACgkQsF6jCi4glqMrkQCfXZm7sEbmgnc2TQnEV84F1fua J2EAoJl0r19pDDLojwojDchEPrMoTo4N =7cUj -----END PGP SIGNATURE----- --Apple-Mail=_307ADA36-2350-41FD-898C-A6A18412F133--