From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7bFr-0000f0-Gd for qemu-devel@nongnu.org; Tue, 02 Dec 2008 14:49:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7bFp-0000cx-2B for qemu-devel@nongnu.org; Tue, 02 Dec 2008 14:49:54 -0500 Received: from [199.232.76.173] (port=41495 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7bFo-0000cu-Sc for qemu-devel@nongnu.org; Tue, 02 Dec 2008 14:49:52 -0500 Received: from an-out-0708.google.com ([209.85.132.245]:4717) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L7bFo-0002Gu-GL for qemu-devel@nongnu.org; Tue, 02 Dec 2008 14:49:52 -0500 Received: by an-out-0708.google.com with SMTP id c38so1166243ana.37 for ; Tue, 02 Dec 2008 11:49:52 -0800 (PST) Message-ID: <4935915B.3030309@codemonkey.ws> Date: Tue, 02 Dec 2008 13:49:47 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 2/2] Add __noreturn function attribute 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> In-Reply-To: <4932A4D9.2070106@web.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 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. This helps for things like sparse. Regards, Anthony Liguori > Jan > >