Subject: noreturn functions
To: None <>
From: Valeriy E. Ushakov <>
List: tech-toolchain
Date: 01/21/2006 03:25:12
To make gcc believe __attribute__((__noreturn__)) claim, the function
must end with a call to a known dead function.  For a "leaf" dead
function adding an infinite loop seems to convince gcc it will not

What about adding somethign like:

#if !defined(__lint__)
#define __NORETURN__	for (;;) continue
#define __NORETURN__

to be used like:

void foo(...) __attribute__((__noreturn__));



Suggestions for a better name are welcome.

PS: If lint sees that infinite loop, it's happy with "for" version,
but for "while" or "do/while" it complains that the loop is not
entered at top.

SY, Uwe
--                         |       Zu Grunde kommen          |       Ist zu Grunde gehen