qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v3 04/10] tcg: Introduce atomic helpers for integer min/max
Date: Tue, 8 May 2018 19:27:08 +0100	[thread overview]
Message-ID: <CAFEAcA9TU_xejXo7ZFUFWK1anqLJ-cHjBLJHmgNnEr=kd-mnXw@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA_YUTbDrTKGBzZtR5MUS3VTCFANmxZ0cBLMMS=OuO_R9A@mail.gmail.com>

On 8 May 2018 at 18:49, Peter Maydell <peter.maydell@linaro.org> wrote:
> [weird compiler errors]

This fixes them:

--- a/include/qemu/atomic.h
+++ b/include/qemu/atomic.h
@@ -187,7 +187,7 @@
 /* Returns the eventual value, failed or not */
 #define atomic_cmpxchg__nocheck(ptr, old, new)    ({                    \
     typeof_strip_qual(*ptr) _old = (old);                               \
-    __atomic_compare_exchange_n(ptr, &_old, new, false,                 \
+    (void)__atomic_compare_exchange_n(ptr, &_old, new, false,           \
                               __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);      \
     _old;                                                               \
 })

Seems pretty clearly a compiler bug -- rth says newer gcc don't
do this, so presumably fixed upstream somewhere between gcc 5 and 6.

thanks
-- PMM

  reply	other threads:[~2018-05-08 18:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08 15:14 [Qemu-devel] [PATCH v3 00/10] target/arm: Implement v8.1-Atomics Richard Henderson
2018-05-08 15:14 ` [Qemu-devel] [PATCH v3 01/10] tcg: Introduce helpers for integer min/max Richard Henderson
2018-05-08 15:14 ` [Qemu-devel] [PATCH v3 02/10] target/arm: Use new min/max expanders Richard Henderson
2018-05-08 15:14 ` [Qemu-devel] [PATCH v3 03/10] target/xtensa: " Richard Henderson
2018-05-08 15:14 ` [Qemu-devel] [PATCH v3 04/10] tcg: Introduce atomic helpers for integer min/max Richard Henderson
2018-05-08 17:37   ` Peter Maydell
2018-05-08 17:49     ` Peter Maydell
2018-05-08 18:27       ` Peter Maydell [this message]
2018-05-10 14:25         ` Peter Maydell
2018-05-08 15:14 ` [Qemu-devel] [PATCH v3 05/10] tcg: Use GEN_ATOMIC_HELPER_FN for opposite endian atomic add Richard Henderson
2018-05-08 15:14 ` [Qemu-devel] [PATCH v3 06/10] target/riscv: Use new atomic min/max expanders Richard Henderson
2018-05-08 15:14 ` [Qemu-devel] [PATCH v3 07/10] target/arm: Introduce ARM_FEATURE_V8_ATOMICS and initial decode Richard Henderson
2018-05-08 16:48   ` Peter Maydell
2018-05-08 17:31     ` Richard Henderson
2018-05-08 15:14 ` [Qemu-devel] [PATCH v3 08/10] target/arm: Fill in disas_ldst_atomic Richard Henderson
2018-05-08 15:14 ` [Qemu-devel] [PATCH v3 09/10] target/arm: Implement CAS and CASP Richard Henderson
2018-05-08 15:14 ` [Qemu-devel] [PATCH v3 10/10] target/arm: Enable ARM_FEATURE_V8_ATOMICS for user-only Richard Henderson
2018-05-08 15:54 ` [Qemu-devel] [PATCH v3 00/10] target/arm: Implement v8.1-Atomics no-reply
2018-05-10 15:03 ` Peter Maydell

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='CAFEAcA9TU_xejXo7ZFUFWK1anqLJ-cHjBLJHmgNnEr=kd-mnXw@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 NNTP newsgroup(s).