From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L8HK6-0006gZ-SN for qemu-devel@nongnu.org; Thu, 04 Dec 2008 11:45:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L8HK6-0006gN-DE for qemu-devel@nongnu.org; Thu, 04 Dec 2008 11:45:06 -0500 Received: from [199.232.76.173] (port=48027 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L8HK6-0006gK-6f for qemu-devel@nongnu.org; Thu, 04 Dec 2008 11:45:06 -0500 Received: from lizzard.sbs.de ([194.138.37.39]:15579) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L8HK5-0000pG-GB for qemu-devel@nongnu.org; Thu, 04 Dec 2008 11:45:05 -0500 Received: from mail1.sbs.de (localhost [127.0.0.1]) by lizzard.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id mB4Gj2dI013637 for ; Thu, 4 Dec 2008 17:45:03 +0100 Received: from [139.25.109.167] (mchn012c.mchp.siemens.de [139.25.109.167] (may be forged)) by mail1.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id mB4Gj2SA028582 for ; Thu, 4 Dec 2008 17:45:02 +0100 Message-ID: <4938090A.50402@siemens.com> Date: Thu, 04 Dec 2008 17:44:58 +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> In-Reply-To: <4935915B.3030309@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 Anthony Liguori wrote: > Jan Kiszka wrote: >> Thiemo Seufer wrote: >> >>> Jan Kiszka wrote: >>> >>>> Avi Kivity wrote: >>>> >>>>> Jan Kiszka wrote: >>>>> >>>>>>> Breaking the standard is what brings us the joys of recently >>>>>>> (re)posted >>>>>>> patch for NetBSD and [u]intXX fun. >>>>>>> >>>>>> I have no problem with calling it 'noreturn' instead. >>>>>> >>>>> That will break code that wants to use 'noreturn' as a local >>>>> variable. I think ATTR_NORETURN, while a lot uglier, is safer. >>>>> >>>> Do you have such code already? Is it exported beyond qemu scope? Then >>>> why not going for our own convention "'noreturn' is reserved as >>>> function >>>> attribute"? (And yes, your macro is ugly :) ). >>>> >>> "Macro names should be in upper case" is also a useful convention. >>> >> >> Generally yes. But there are exceptions when the macro is used in a >> context where upper case disturbs the readability instead of improving >> it. I would argue that this is the case here, but it's always a matter >> of taste. >> >> >>> FWIW, I agree with Stefan, there's currently not much need to isolate >>> gcc-isms. >>> >> >> 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. >> > > Please stick with the #define. It's not about the GCC-ism, it's being > able to quickly replace it with something else. For sure. Err... but which one now? "noreturn" is already available as signed patch. Jan -- Siemens AG, Corporate Technology, CT SE 26 Corporate Competence Center Embedded Linux