Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764389AbXEYRfo (ORCPT ); Fri, 25 May 2007 13:35:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759996AbXEYRfi (ORCPT ); Fri, 25 May 2007 13:35:38 -0400 Received: from nic.NetDirect.CA ([216.16.235.2]:44445 "EHLO rubicon.netdirect.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757605AbXEYRfh (ORCPT ); Fri, 25 May 2007 13:35:37 -0400 X-Originating-Ip: 72.143.65.211 Date: Fri, 25 May 2007 13:33:29 -0400 (EDT) From: "Robert P. J. Day" X-X-Sender: rpjday@localhost.localdomain To: Satyam Sharma cc: Krzysztof Halasa , Adrian Bunk , Linux Kernel Mailing List Subject: Re: any value to "NORET_TYPE" macro? In-Reply-To: Message-ID: References: <20070522161951.GC2098@stusta.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Net-Direct-Inc-MailScanner-Information: Please contact the ISP for more information X-Net-Direct-Inc-MailScanner: Found to be clean X-Net-Direct-Inc-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-16.8, required 5, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -15.00, INIT_RECVD_OUR_AUTH -20.00, RCVD_IN_SORBS_DUL 20.00) X-Net-Direct-Inc-MailScanner-From: rpjday@mindspring.com Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1629 Lines: 42 On Fri, 25 May 2007, Satyam Sharma wrote: > On 5/24/07, Robert P. J. Day wrote: > > while in actual definitions, they typically go after the return type, > > as in arch/arm/kernel/traps.c: > > > > void __attribute__((noreturn)) __bug(const char *file, int line) > > { > > printk(KERN_CRIT"kernel BUG at %s:%d!\n", file, line); > > *(int *)0 = 0; > > > > /* Avoid "noreturn function does return" */ > > for (;;); > > } > > Function attributes don't need to appear in function definitions at all. > (I've not come across such cases often, so this is certainly not the > standard). Anyway, the above is a case that the function lacks a > separate declaration which is why we put it there at the definition. > And yes, if we really do have to put an attribute in the function > definition, then we do need to place it _before_ the function name. right -- the above was referring only to those instances (and there are some of them) where there is no declaration, only a definition. i'll take another shot at a patch shortly. rday -- ======================================================================== Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA http://fsdev.net/wiki/index.php?title=Main_Page ======================================================================== - 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/