From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMCUf-0000jz-Op for qemu-devel@nongnu.org; Wed, 18 Sep 2013 03:48:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMCUZ-0003aD-Ow for qemu-devel@nongnu.org; Wed, 18 Sep 2013 03:48:13 -0400 Received: from mout.web.de ([212.227.17.11]:61029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMCUZ-0003a7-EH for qemu-devel@nongnu.org; Wed, 18 Sep 2013 03:48:07 -0400 Received: from mchn199C.mchp.siemens.de ([95.157.58.223]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0MXYS2-1VSCVU06tC-00WXPq for ; Wed, 18 Sep 2013 09:48:06 +0200 Message-ID: <52395AB5.60309@web.de> Date: Wed, 18 Sep 2013 09:48:05 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1379437402-30804-1-git-send-email-sw@weilnetz.de> <5239510D.9070608@web.de> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4GUJnr7GOwu6JiGIW72UCSxcu8tawwIkR" Subject: Re: [Qemu-devel] [PATCH] cpu-exec: Fix compiler warning (-Werror=clobbered) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Stefan Weil , qemu-devel , Anthony Liguori This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4GUJnr7GOwu6JiGIW72UCSxcu8tawwIkR Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2013-09-18 09:26, Peter Maydell wrote: > On 18 September 2013 08:06, Jan Kiszka wrote: >> On 2013-09-17 23:24, Peter Maydell wrote: >>> On 17 September 2013 18:03, Stefan Weil wrote: >>>> could you please review this patch which removes code added by you e= arlier? >>>> I have run tests with the old code and assertions to see whether the= values >>>> were really smashed. They never were, and from the documentation of = setjmp >>>> I'd not expect that they ever might be. >>> >>> We had a discussion about this back in 2011. Any compiler which needs= >>> these statements is definitely buggy -- the C standard mandates that >>> they're not needed. >> >> I'm not that sure about this. We have a no-return function involved >> between setjmp and the actual longjmp. Why should the compiler have to= >> preserve local variables when entering cpu_loop_exit? >=20 > Because the C standard specification for setjmp and longjmp > says it must (if they are not changed between the setjmp and > the longjmp call; locals which are changed need not be preserved). > I quoted the relevant section from C99 in the discussion I linked. > And gcc's documentation of the 'noreturn' attribute specifically > says it does not affect the exceptional path where the function > returns via longjmp. OK, that is the clarifying bit of information. Now the question is if want to drop support for faulty compilers again, work around the false-positive warning, or avoid the issue differently than via reloading. Jan --4GUJnr7GOwu6JiGIW72UCSxcu8tawwIkR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlI5WrUACgkQitSsb3rl5xSKKwCgk7iF1a2ZnDABrADgW9P3YE8x ItoAoKseaBUxCDCG/80vh0v5k+Lp7JWv =Hyov -----END PGP SIGNATURE----- --4GUJnr7GOwu6JiGIW72UCSxcu8tawwIkR--