From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVRd3-0004vs-QH for qemu-devel@nongnu.org; Mon, 05 Nov 2012 13:42:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVRcz-0004T0-QR for qemu-devel@nongnu.org; Mon, 05 Nov 2012 13:42:33 -0500 Message-ID: <5098084B.2060105@redhat.com> Date: Mon, 05 Nov 2012 11:41:15 -0700 From: Eric Blake MIME-Version: 1.0 References: <1352060975-18646-1-git-send-email-sw@weilnetz.de> <20121105070340.GH31495@ohm.aurel32.net> In-Reply-To: <20121105070340.GH31495@ohm.aurel32.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig6EA1E32A6804A7A84F149836" Subject: Re: [Qemu-devel] [PATCH] target-mips: Fix compiler warnings caused by very large constants List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-trivial@nongnu.org, Stefan Weil , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6EA1E32A6804A7A84F149836 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 11/05/2012 12:03 AM, Aurelien Jarno wrote: > On Sun, Nov 04, 2012 at 09:29:35PM +0100, Stefan Weil wrote: >> Those constants are larger than 32 bits and need a suffix to avoid >> warnings from some versions of gcc. >> >> Signed-off-by: Stefan Weil >> @@ -3653,7 +3653,7 @@ target_ulong helper_extr_s_h(target_ulong ac, ta= rget_ulong shift, >> if (temp > (int64_t)0x7FFF) { >> temp =3D 0x00007FFF; >> set_DSPControl_overflow_flag(1, 23, env); >> - } else if (temp < (int64_t)0xFFFFFFFFFFFF8000) { >> + } else if (temp < (int64_t)0xFFFFFFFFFFFF8000LL) { Instead of using both a suffix and a cast to int64_t, shouldn't we instead be writing '(temp < INT64_C(0xFFFFFFFFFFFF8000))'? >=20 > Blue Swirl proposed the same patch a bit earlier then you, and I have > just applied it. But since I've seldom seen code using the *_C() macros from , it doesn't bother me enough to pursue it any further now that the immediate concern of compiler warnings has been silenced. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig6EA1E32A6804A7A84F149836 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBCAAGBQJQmAhNAAoJEKeha0olJ0NqYfQIAJIHnh62eripiCw/d+M3nO0n 4+YwlT4GrNcARmE9nXaWc6WWLu1W4XfAeafm4Io8XM3yNNYwMLn90LfEYi4c7VFi MlcsCZidIjZI23nXly5l2zpf6/tDtQJVIc6hn8sKtypNyDfkpRYj0/hKylF9ntNz T/Jcuqb4W0KvhR+jjOHNkXCXMxm0VPBY+LQQl5UPXY1c7n2O17AUSryFeosL93Fx 5qmg9KgbL/BvM6t9jkp+9v3xb0lSGxXF+Q9jhHhzvtApv0ijUj1DSLI6X7x0/JQ3 gsluhzCbu0lgv9pO5FGsohU1z4xCktnUiBkMR6OugfzhK3tFxSqRrs8Cyjy5QTQ= =3Y9+ -----END PGP SIGNATURE----- --------------enig6EA1E32A6804A7A84F149836--