From: Joseph Myers <josmyers@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>,
Marek Polacek <polacek@redhat.com>,
gcc-patches@gnu.org
Subject: Re: [PATCH v3 2/5] C++: Support clang compatible [[musttail]] (PR83324)
Date: Wed, 31 Jan 2024 21:53:27 +0000 (UTC) [thread overview]
Message-ID: <d1763e42-976-5416-53d1-e391c0c4b630@redhat.com> (raw)
In-Reply-To: <ZbqvLCmPeIiPPSRw@tucnak>
On Wed, 31 Jan 2024, Jakub Jelinek wrote:
> On Wed, Jan 31, 2024 at 12:21:38PM -0800, Andi Kleen wrote:
> > > > + case RID_RETURN:
> > > > + {
> > > > + bool musttail_p = false;
> > > > + std_attrs = process_stmt_hotness_attribute (std_attrs, attrs_loc);
> > > > + if (lookup_attribute ("", "musttail", std_attrs))
> > > > + {
> > > > + musttail_p = true;
> > > > + std_attrs = remove_attribute ("", "musttail", std_attrs);
> > > > + }
>
> Using "" looks wrong to me, that is for standard attributes which
> are also gnu attributes, say [[noreturn]]/[[gnu::noreturn]].
> That is not the case here. Even the __attribute__((musttail)) form will have
> gnu namespace.
And it's incorrect to use [[musttail]] (C23 syntax, no namespace) in any
circumstances, at least for C, as it's not a standard attribute - so tests
should verify that [[musttail]] is diagnosed as ignored even in contexts
where [[gnu::musttail]] is valid. (It can't be standardized as
[[musttail]] because of the rule that standard attributes must be
ignorable; the proposed syntax for a TS and possible future
standardization after that is "return goto".)
--
Joseph S. Myers
josmyers@redhat.com
next prev parent reply other threads:[~2024-01-31 21:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 2:17 Updated [[musttail]] patchkit Andi Kleen
2024-01-31 2:17 ` [PATCH v3 1/5] Improve must tail in RTL backend Andi Kleen
2024-01-31 18:04 ` Marek Polacek
2024-01-31 20:16 ` Andi Kleen
2024-01-31 20:27 ` Marek Polacek
2024-01-31 2:17 ` [PATCH v3 2/5] C++: Support clang compatible [[musttail]] (PR83324) Andi Kleen
2024-01-31 19:55 ` Marek Polacek
2024-01-31 20:21 ` Andi Kleen
2024-01-31 20:35 ` Jakub Jelinek
2024-01-31 21:53 ` Joseph Myers [this message]
2024-01-31 2:17 ` [PATCH v3 3/5] C: Implement musttail attribute for returns Andi Kleen
2024-01-31 2:17 ` [PATCH v3 4/5] Add tests for C/C++ musttail attributes Andi Kleen
2024-01-31 12:44 ` Prathamesh Kulkarni
2024-01-31 20:11 ` Marek Polacek
2024-02-01 7:39 ` Andi Kleen
2024-02-01 14:03 ` Marek Polacek
2024-02-01 17:33 ` Joseph Myers
2024-01-31 2:17 ` [PATCH v3 5/5] Add documentation for musttail attribute Andi Kleen
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=d1763e42-976-5416-53d1-e391c0c4b630@redhat.com \
--to=josmyers@redhat.com \
--cc=ak@linux.intel.com \
--cc=gcc-patches@gnu.org \
--cc=jakub@redhat.com \
--cc=polacek@redhat.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.
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).