lkml.org 
[lkml]   [2007]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: any value to "NORET_TYPE" macro?
On Wed, 23 May 2007, Satyam Sharma wrote:

> Actually there's another thing :-) The __attribute__((xxx)) must go
> with the function _declarations_ (and not the
> implementations/definitions).

that's not true, AFAICT. the pattern seems to be that, in the case of
declarations, attributes go at the end, as in:

arch/sparc/boot/btfixupprep.c:void fatal(void) __attribute__((noreturn));

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 (;;);
}

is that the standard that most people use? if it is, i can use that
standard for the cleanup.

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/

\
 
 \ /
  Last update: 2007-05-24 18:47    [W:0.915 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site