public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Julian Waters <tanksherman27@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Basic asm blocks should always be volatile
Date: Wed, 28 Jun 2023 19:14:37 +0800	[thread overview]
Message-ID: <CAP2b4GP8u1WRPg-A1b0p5eWduBuU4JuJVCSfE4xh-kcK15VenQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 940 bytes --]

Hi all,

I've revised the change to be much neater

From 480954bc7d2b24e5d19a98260a2be0b49e112c42 Mon Sep 17 00:00:00 2001
From: TheShermanTanker <tanksherman27@gmail.com>
Date: Wed, 28 Jun 2023 19:11:34 +0800
Subject: [PATCH] asm not using extended syntax should always be volatile

---
 gcc/cp/parser.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index a6341b9..2d5d494 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -22355,7 +22355,7 @@ cp_parser_asm_definition (cp_parser* parser)
       /* Create the ASM_EXPR.  */
       if (parser->in_function_body)
  {
-   asm_stmt = finish_asm_stmt (asm_loc, volatile_p, string, outputs,
+   asm_stmt = finish_asm_stmt (asm_loc, !extended_p || volatile_p, string,
outputs,
        inputs, clobbers, labels, inline_p);
    /* If the extended syntax was not used, mark the ASM_EXPR.  */
    if (!extended_p)
-- 
2.35.1.windows.2

             reply	other threads:[~2023-06-28 11:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28 11:14 Julian Waters [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-06-27 16:05 Julian Waters

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=CAP2b4GP8u1WRPg-A1b0p5eWduBuU4JuJVCSfE4xh-kcK15VenQ@mail.gmail.com \
    --to=tanksherman27@gmail.com \
    --cc=gcc-patches@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).