Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 6 Sep 2012 16:02:50 +0200
From: philomath <>
Subject: Re: Re: [PATCH] Add _Noreturn specifier to functions
 specified as such by ISO C11


On Wed, 5 Sep 2012 23:12:36 -0400
Rich Felker <> wrote:

> On Wed, Sep 05, 2012 at 08:02:35PM +0200, philomath wrote:
> > Hi,
> > 
> > Here is an updated version, addressing the issues rich mentioned.
> > 
> > Should I add _Noreturn to other functions too (such as the various a_crash
> > versions, *err*, etc)?
> I don't really care about the err.h functions; these are legacy junk
> and should not be used in modern programs. I'm pretty much indifferent
> to whether they get _Noreturn, but if so, let's save it for a separate
> patch/commit.

Right, they shouldn't be used. but we might as well add this as we pass along,
if you don't object.

> As for a_crash, I'd like having it there in principle, but I don't
> like duplicating the #if logic in each platform's atomic.h. Since this
> code is internal and already depends on __asm__, it probably would not
> hurt to just use __attribute__((__noreturn__)), perhaps with #ifdef
> __GNUC__ around it. It's the public headers that need to be compatible
> with an arbitrary C99/C11 compiler; the internals of musl depend on
> "minimal GNU C" in the form of inline asm and some related things.
> This can also be a separate patch/commit since it's unrelated to
> making the headers conform to C11.

Good, will do.
Other then thrd_exit (which is not yet implemented on musl), the patch I
sent adds _Noreturn to all such C11 functions.  is the patch in good shape now?

Some ther functions that can use _Noreturn:

pthread_exit, _exit, siglongjmp, _longjmp.  these are not specified in POSIX
with _Noreturn, neither will they be in the upcoming TC1. but that's not a
problem, since we are just conveying to the compiler what the standard does
say, right?

_start (the C version), __stack_chk_fail, __assert_fail, cleanup_fromsig.
non-standard functions.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.