mailing list of musl libc
 help / color / mirror / code / Atom feed
From: philomath <philomath868@gmail.com>
To: musl@lists.openwall.com
Subject: Re: Re: [PATCH] Add _Noreturn specifier to functions specified as such by ISO C11
Date: Thu, 6 Sep 2012 16:02:50 +0200	[thread overview]
Message-ID: <20120906160250.69b15b99@gmail.com> (raw)
In-Reply-To: <20120906031236.GZ27715@brightrain.aerifal.cx>

Hi,

On Wed, 5 Sep 2012 23:12:36 -0400
Rich Felker <dalias@aerifal.cx> 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.

Thanks.


  reply	other threads:[~2012-09-06 14:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05 11:53 philomath
2012-09-05 14:18 ` Rich Felker
2012-09-05 18:02 ` philomath
2012-09-06  3:12   ` Rich Felker
2012-09-06 14:02     ` philomath [this message]
2012-09-06 16:19       ` Rich Felker
2012-09-07  1:34       ` Anthony J. Bentley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120906160250.69b15b99@gmail.com \
    --to=philomath868@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).