From: Mark Hobley on
I am importing a very small C program from bsd onto a gnu based system. I
otice that after the declarations there is a macro __dead used in a prototype
definition as follows:

__dead void usage(void);

What is the purpose of the __dead macro?
Can I eliminate this?

What is the purpose of the usage() call? I could not immediately find any
documentation relating to that.

Mark.

--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/

From: Mark Hobley on
In comp.unix.programmer Mark Hobley <markhobley(a)hotpop.donottypethisbit.com> wrote:
> What is the purpose of the usage() call? I could not immediately find any
> documentation relating to that.

I found the usage() function within the code. It is simply defined as

void usage(void)

I don't know what the __dead before the prototype is supposed to do.

Mark.

--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/

From: pk on
Mark Hobley wrote:

> In comp.unix.programmer Mark Hobley
> <markhobley(a)hotpop.donottypethisbit.com> wrote:
>> What is the purpose of the usage() call? I could not immediately find any
>> documentation relating to that.
>
> I found the usage() function within the code. It is simply defined as
>
> void usage(void)
>
> I don't know what the __dead before the prototype is supposed to do.

And in addition to that, you don't even read the answers you get.

From: Mark Hobley on
In comp.os.linux.development.apps Stefan Ram <ram(a)zedat.fu-berlin.de> wrote:

> Using Google, it took me about 30 seconds to learn that
> this seems to be used to mark non-returning functions.

Right ok. What did you type in the search box, and which link did you follow
to obtain this?

Presumably __dead is non portable?

How could I translate this into C89?

Mark.

--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/

From: Rainer Weikusat on
markhobley(a)hotpop.donottypethisbit.com (Mark Hobley) writes:
> In comp.os.linux.development.apps Stefan Ram <ram(a)zedat.fu-berlin.de> wrote:
>
>> Using Google, it took me about 30 seconds to learn that
>> this seems to be used to mark non-returning functions.
>
> Right ok. What did you type in the search box, and which link did you follow
> to obtain this?
>
> Presumably __dead is non portable?
>
> How could I translate this into C89?

Not at all. It's a gcc extension in disguise [__attribute__
((noreturn))] and a poorly named one (since 'dead' rather suggest
'dead code' than 'program death').