public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "xry111 at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/10837] noreturn attribute causes no sibling calling optimization
Date: Mon, 12 Feb 2024 02:39:17 +0000	[thread overview]
Message-ID: <bug-10837-4-w6lpzWcfp0@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-10837-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10837

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=83324
                 CC|                            |xry111 at gcc dot gnu.org

--- Comment #16 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to gooncreeper from comment #15)
> May I suggest we just add something like __attribute__((trace)) for the
> special abort case? Noreturn was added for code optimization after all, not
> for backtracing.

It will break any attempts to debug an abort until the libc headers are updated
to use __attribute__((trace)).

Note that in GCC noreturn has been added far before the WG14 _Noreturn paper
(even this ticket predates the WG14 paper), so the rationale in the paper may
not apply.

In practice most _Noreturn functions are abort, exit, ..., i.e. they are only
executed one time so optimizing against a cold path does not help much.  I
don't think it's a good idea to encourage people to construct some fancy code
by a recursive _Noreturn function (why not just use a loop?!)  And if you must
write such fancy code anyway IMO musttail attribute (PR83324) will be a better
solution.

  parent reply	other threads:[~2024-02-12  2:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-10837-4@http.gcc.gnu.org/bugzilla/>
2013-01-31 21:47 ` pinskia at gcc dot gnu.org
2013-02-03  2:19 ` pinskia at gcc dot gnu.org
2013-08-10  0:17 ` luto at mit dot edu
2013-08-14 15:38 ` pinskia at gcc dot gnu.org
2015-08-23 13:41 ` pinskia at gcc dot gnu.org
2015-08-25 11:26 ` hjl.tools at gmail dot com
2023-10-12 14:28 ` xry111 at gcc dot gnu.org
2024-02-11 19:51 ` goon.pri.low at gmail dot com
2024-02-12  2:39 ` xry111 at gcc dot gnu.org [this message]
2024-02-12  4:38 ` lukas.graetz@tu-darmstadt.de
2024-02-14 11:40 ` lukas.graetz@tu-darmstadt.de
2024-02-25 11:48 ` pskocik at gmail dot com
2024-02-26 15:17 ` lukas.graetz@tu-darmstadt.de
     [not found] <bug-10837-6528@http.gcc.gnu.org/bugzilla/>
2007-08-16 10:39 ` pinskia at gcc dot gnu dot org
2007-08-28 19:07 ` kauer at os dot inf dot tu-dresden dot de
2007-08-28 19:27 ` kauer at os dot inf dot tu-dresden dot de
2007-12-26  9:36 ` pinskia at gcc dot gnu dot org

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=bug-10837-4-w6lpzWcfp0@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).