Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752031AbXEYW2E (ORCPT ); Fri, 25 May 2007 18:28:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750994AbXEYW1y (ORCPT ); Fri, 25 May 2007 18:27:54 -0400 Received: from terminus.zytor.com ([192.83.249.54]:58292 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbXEYW1x (ORCPT ); Fri, 25 May 2007 18:27:53 -0400 Message-ID: <4657626B.7010204@zytor.com> Date: Fri, 25 May 2007 15:25:47 -0700 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.0 (X11/20070419) MIME-Version: 1.0 To: Satyam Sharma CC: "Robert P. J. Day" , Linux Kernel Mailing List , Ralf Baechle Subject: Re: [PATCH] MIPS: Transform old-style macros to newer "__noreturn" standard. References: <46572DAF.1000108@zytor.com> <46573B23.1090700@zytor.com> <4657589F.7050509@zytor.com> In-Reply-To: X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1308 Lines: 32 Satyam Sharma wrote: > > But __attribute__((noreturn)) is simply a _function attribute_. Of course, > it is legal / valid only for functions with return-type void, so it does > make > sense to combine both void and __attribute__((noreturn)) in the same > macro like you say. But that's not syntactically necessary. In fact, > grepping through the sources, a lot of people do prefer to place the > attribute _after_ the function declarator. > > Anyway, I'm fine either way. > Sorry to say, but weren't you the person who didn't recognize !! as the idiomatic booleanizing operator? I think you need to learn that everything that the compiler accepts isn't necessarily idiomatic, readable code. Consider __attribute__((noreturn)); it's a nonstandard feature implemented using a generic gcc mechanism -- thus what the compiler will accept is quite flexible, because it's a generic building block. It doesn't mean it's a good idea. The reason it's often written at the end of the expression mostly has to do with bugs in some very early versions of gcc. -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/