From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L8J7V-0000HW-6N for qemu-devel@nongnu.org; Thu, 04 Dec 2008 13:40:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L8J7T-0000HK-SI for qemu-devel@nongnu.org; Thu, 04 Dec 2008 13:40:12 -0500 Received: from [199.232.76.173] (port=41698 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L8J7T-0000HH-KH for qemu-devel@nongnu.org; Thu, 04 Dec 2008 13:40:11 -0500 Received: from fmmailgate03.web.de ([217.72.192.234]:33229) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L8J7T-0005gY-0Q for qemu-devel@nongnu.org; Thu, 04 Dec 2008 13:40:11 -0500 Received: from smtp08.web.de (fmsmtp08.dlan.cinetic.de [172.20.5.216]) by fmmailgate03.web.de (Postfix) with ESMTP id 938E1F51C52B for ; Thu, 4 Dec 2008 19:40:08 +0100 (CET) Received: from [88.65.240.121] (helo=[139.25.109.167]) by smtp08.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.109 #226) id 1L8J7P-0004WY-00 for qemu-devel@nongnu.org; Thu, 04 Dec 2008 19:40:08 +0100 Message-ID: <493823F6.6000407@web.de> Date: Thu, 04 Dec 2008 19:39:50 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <492FDA5D.6080602@siemens.com> <493030EA.4040405@web.de> <49326633.9020007@redhat.com> <49328833.3000605@web.de> <20081130131107.GA28482@networkno.de> <4932A4D9.2070106@web.de> <4935915B.3030309@codemonkey.ws> <4938090A.50402@siemens.com> In-Reply-To: <4938090A.50402@siemens.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE1ED2F02F411147E18B5F59C" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH 2/2] Add __noreturn function attribute Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE1ED2F02F411147E18B5F59C Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Jan Kiszka wrote: > Anthony Liguori wrote: >> Jan Kiszka wrote: >>> Thiemo Seufer wrote: >>> =20 >>>> Jan Kiszka wrote: >>>> =20 >>>>> Avi Kivity wrote: >>>>> =20 >>>>>> Jan Kiszka wrote: >>>>>> =20 >>>>>>>> Breaking the standard is what brings us the joys of recently >>>>>>>> (re)posted >>>>>>>> patch for NetBSD and [u]intXX fun. >>>>>>>> =20 >>>>>>> I have no problem with calling it 'noreturn' instead. >>>>>>> =20 >>>>>> That will break code that wants to use 'noreturn' as a local >>>>>> variable. I think ATTR_NORETURN, while a lot uglier, is safer. >>>>>> =20 >>>>> Do you have such code already? Is it exported beyond qemu scope? Th= en >>>>> why not going for our own convention "'noreturn' is reserved as >>>>> function >>>>> attribute"? (And yes, your macro is ugly :) ). >>>>> =20 >>>> "Macro names should be in upper case" is also a useful convention. >>>> =20 >>> Generally yes. But there are exceptions when the macro is used in a >>> context where upper case disturbs the readability instead of improvin= g >>> it. I would argue that this is the case here, but it's always a matte= r >>> of taste. >>> >>> =20 >>>> FWIW, I agree with Stefan, there's currently not much need to isolat= e >>>> gcc-isms. >>>> =20 >>> If everyone prefers having __attribute__ in the function prototypes >>> directly -- OK. All I want is to get rid of the warnings without >>> changing the code into the wrong direction. >>> =20 >> Please stick with the #define. It's not about the GCC-ism, it's being= >> able to quickly replace it with something else. >=20 > For sure. Err... but which one now? "noreturn" is already available as > signed patch. =2E..but that patch in fact has an issue with existing __attribute__((noreturn)) sites. Converting them all to the common macro raises the question where to put the definition. qemu-common.h appears logical on first sight, but due to dyngen-exec.h's redefinition mess we cannot include that header easily. I'm currently trying to find a workaround that is not too invasive and can quickly be removed once dyngen is gone. The deeper I dig for that, the more weird the dependencies get. However, please let me know if the preferred macro name is different from "noreturn". Jan --------------enigE1ED2F02F411147E18B5F59C 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.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkk4I/0ACgkQniDOoMHTA+kbSgCeKt5qIWOgmXtdNm54NaA7OBnT rEkAnRs6+ggeCBFR7FXiIKE//tGkBC17 =vLMG -----END PGP SIGNATURE----- --------------enigE1ED2F02F411147E18B5F59C--