From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id upmRFSSdjWG8RgAAWB0awg (envelope-from ) for ; Thu, 11 Nov 2021 17:45:56 -0500 Received: by simark.ca (Postfix, from userid 112) id 475371F0BD; Thu, 11 Nov 2021 17:45:56 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B68151ECEB for ; Thu, 11 Nov 2021 17:45:55 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 44DEF385B804 for ; Thu, 11 Nov 2021 22:45:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44DEF385B804 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1636670755; bh=TO7/QhValicdyryo68Ss5cWma6TJxv3JAekiXejjwnk=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=RTQsEj30mCjDYbAIxwsPNLqkRVf8z5DVy05mKDGJA+AY0O3jbPhpUbnKuz9ronwkG sSjt4q/d2Ox3EGSMS84mkOr01U8PHkbJ33UEogFZzZZTcP/bKmZrj86il0fRgH1s06 4lHMQXwXqM0BLhMYLNU7ZjVIcqxHYzHtd260Cs2E= Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 997F5385AC36 for ; Thu, 11 Nov 2021 22:45:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 997F5385AC36 Received: by smtp.gentoo.org (Postfix, from userid 559) id 3D33B342E99; Thu, 11 Nov 2021 22:45:36 +0000 (UTC) Date: Thu, 11 Nov 2021 17:45:39 -0500 To: Luis Machado Subject: Re: [PATCH 1/6] sim: sh: rework register layout with anonymous unions & structs Message-ID: Mail-Followup-To: Luis Machado , gdb-patches@sourceware.org References: <20211107003254.4298-1-vapier@gentoo.org> <68a4c7ee-700a-22f5-62ad-9257de03e9f9@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gXpQKbMowfydWCdZ" Content-Disposition: inline In-Reply-To: X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --gXpQKbMowfydWCdZ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 11 Nov 2021 19:32, Luis Machado via Gdb-patches wrote: > On 11/11/21 7:25 PM, Mike Frysinger wrote: > > On 11 Nov 2021 09:41, Luis Machado wrote: > >> I can't pinpoint the exact SH patch, but builds are broken for > >> --enable-targets=3Dall in Ubuntu 18.04 with GCC 7.5: > >=20 > > pretty sure the warnings have always been there for you, we just turned > > -Werror in more cases recently >=20 > That's fine and I'm all for more -Werror. But builds should be able to=20 > complete regardless, right? they do build for me in a huge variety of configurations. but i don't test every random distro version that people might have. plus for release, we turn off automatic -Werror, so the issue you highlight only affects the live development tree. it's not going to break releases that distros use. > >> binutils-gdb/sim/sh/interp.c: In function =E2=80=98ppi_insn=E2=80=99: > >> ./ppi.c:875:21: error: assuming signed overflow does not occur when > >> assuming that (X + c) < X is always false [-Werror=3Dstrict-overflow] > >> carry =3D res < Sy; > >> ~~~~^~~~ > >> ./ppi.c:849:21: error: assuming signed overflow does not occur when > >> assuming that (X - c) > X is always false [-Werror=3Dstrict-overflow] > >> carry =3D res > Sy; > >> ~~~~^~~~ > >> ./ppi.c:823:21: error: assuming signed overflow does not occur when > >> assuming that (X + c) < X is always false [-Werror=3Dstrict-overflow] > >> carry =3D res < Sx; > >> ~~~~^~~~ > >> ./ppi.c:797:21: error: assuming signed overflow does not occur when > >> assuming that (X - c) > X is always false [-Werror=3Dstrict-overflow] > >> carry =3D res > Sx; > >> ~~~~^~~~ > >> binutils-gdb-arm64-bionic/sim/../../../repos/binutils-gdb/sim/sh/inter= p.c: > >> In function =E2=80=98sim_resume=E2=80=99: > >> ./ppi.c:1178:28: warning: =E2=80=98res=E2=80=99 may be used uninitiali= zed in this > >> function [-Wmaybe-uninitialized] > >> MACL =3D DSP_R (z) =3D res; > >> ./ppi.c:44:7: note: =E2=80=98res=E2=80=99 was declared here > >> int res, res_grd; > >> ^~~ > >=20 > > how exactly are you building things ? we don't enable -Wstrict-overflo= w. >=20 > No special way. I just ./configure with --enable-targets=3Dall and let it= =20 > run. I can bisect it or gather a bit more information if you think it=20 > would be useful. bisect would't really help. as i said, the warnings have probably long been there. what changed is using -Werror in more places, and that commit is ea= sy to pick out. > Worth mentioning that it doesn't run into such warnings/failures on=20 > Ubuntu 20.04 with gcc 9.3. it looks like gcc changed behavior starting in gcc-8. in older versions, -fstrict-overflow was enabled at -O2. -mike --gXpQKbMowfydWCdZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmGNnRMACgkQQWM7n+g3 9YGUkRAAqjE/eFz3AA8X/Bij0JVC2vuFvJNfKC4SieYWQ6CXU4Of8E2ru9W0vTQ9 L6NfeCThrT2flOCQ7jmyNfHoc3scyyzhpFJFpkWMi82pECulod2prTufPhYmNpvS 6Tnfb0eSIAUi+EIzPSdPMciChQHuSRYY9jKuZQHVdLKm9mkxuYcIStumQ4rbW/fr VzQJ57hkIuJibHs6cNzmkO9n0vru9c0gIRjzfZ54ArtoJ8VoNrT5oBA29MKI7WD6 4RhKmdJPoalhnLjTvl7XKfXRKr8eiE4n2IZ6089SDQdfs/hjJ7EeobSzRLsjivDO ozs43pp2ydhbPGQ14hwRaABtx9euQgFSAYMrn5yAKUk2M8A/GXUq7E2RBb5c0NAy hsVWStjfFyklzdByNVVl+CD9XEMsCxPd8YKibU8hGrDDKVK3iltST8p6rAYGJzdd idfGkGq29d501AXxjI1v8oC9bLdKfYQy/iW6vhA8N1ul8RcYqZPmu0p0zy1r7nQh sImNOhm79g4GgxEvZ+5KI2PBDtyFT0f8hTD89c5tKqA2SOEDKZpLaxKB4EhB4Xuw 1dd/XBuFP67AoDwfeB0GYbrWTvCBFHvI0O9I4sXd5CvSVjfCv7O+Oh0nGaOZpdTJ HFU0Mf5QSPav31rLDkuU/G8NTKFL7MdGdoB3auiPHbWyApci11U= =2BWo -----END PGP SIGNATURE----- --gXpQKbMowfydWCdZ--