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 c++/110734] Attributes cannot be applied to asm statements
Date: Fri, 01 Dec 2023 05:43:44 +0000	[thread overview]
Message-ID: <bug-110734-4-cvh3J6UAQR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110734-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #14 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Wait a minute.  [[gnu::no_reorder]] is a function or variable attribute, so
it's just not intended to be used for an asm statement.  Actually it won't work
for any statement:

int x;
int main()
{
        [[gnu::no_reorder]]
        x += 1;
}

gives:

t.c: In function 'main':
t.c:5:9: warning: 'no_reorder' attribute ignored [-Wattributes]
    5 |         x += 1;
      |         ^

We have "statement attributes" (fallthrough and assume) but the doc is clear
that they can only be set on null statements, while asm statements are not null
statements.

Now to me this is just an invalid PR.  Or am I missing something?

  parent reply	other threads:[~2023-12-01  5:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19  7:45 [Bug c++/110734] New: " tanksherman27 at gmail dot com
2023-07-19  7:47 ` [Bug c++/110734] " tanksherman27 at gmail dot com
2023-07-19  7:50 ` pinskia at gcc dot gnu.org
2023-07-19  7:57 ` tanksherman27 at gmail dot com
2023-07-19  9:43 ` rguenth at gcc dot gnu.org
2023-07-22  3:30 ` tanksherman27 at gmail dot com
2023-11-23  2:33 ` tanksherman27 at gmail dot com
2023-11-29 10:45 ` tanksherman27 at gmail dot com
2023-11-29 10:47 ` tanksherman27 at gmail dot com
2023-11-30 14:59 ` [Bug c++/110734] Attributes cannot be applied to asm declarations tanksherman27 at gmail dot com
2023-11-30 16:22 ` xry111 at gcc dot gnu.org
2023-11-30 16:24 ` xry111 at gcc dot gnu.org
2023-11-30 16:27 ` mpolacek at gcc dot gnu.org
2023-12-01  4:52 ` tanksherman27 at gmail dot com
2023-12-01  5:34 ` [Bug c++/110734] Attributes cannot be applied to asm statements xry111 at gcc dot gnu.org
2023-12-01  5:43 ` xry111 at gcc dot gnu.org [this message]
2023-12-01  5:51 ` [Bug c++/110734] Attributes cannot be applied to asm declaration xry111 at gcc dot gnu.org
2023-12-01  5:53 ` xry111 at gcc dot gnu.org
2023-12-01  6:22 ` tanksherman27 at gmail dot com
2023-12-01  6:23 ` tanksherman27 at gmail dot com
2023-12-01  6:56 ` jakub at gcc dot gnu.org
2023-12-02 14:11 ` tanksherman27 at gmail dot com
2023-12-05 16:39 ` cvs-commit at gcc dot gnu.org
2023-12-05 17:03 ` jakub at gcc dot gnu.org
2023-12-05 17:04 ` jakub at gcc dot gnu.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-110734-4-cvh3J6UAQR@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).