From: Paolo Bonzini <pbonzini@redhat.com>
To: Eric Blake <eblake@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
"open list:Block layer core" <qemu-block@nongnu.org>,
quintela@redhat.com, crosthwaite.peter@gmail.com,
f4bug@amsat.org, dgilbert@redhat.com, kraxel@redhat.com,
dirty.ice.hu@gmail.com, Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH v3] osdep: Make MIN/MAX evaluate arguments only once
Date: Thu, 4 Jun 2020 20:39:28 +0200 [thread overview]
Message-ID: <9ed75afd-1b82-de22-0d35-23808669ee03@redhat.com> (raw)
In-Reply-To: <b4edd86c-a4cc-0b1d-ae28-009fe0a471e1@redhat.com>
On 03/06/20 21:26, Eric Blake wrote:
>
> Yes, I just tested; using "((void)0)" in place of
> "__builtin_unreachable()" has the same effect (no change to valid use,
> and still a compiler error on misuse). gcc:
>
> /home/eblake/qemu/qemu-img.c: In function ‘is_allocated_sectors’:
> /home/eblake/qemu/qemu-img.c:1225:15: error: void value not ignored as
> it ought to be
> 1225 | i = MIN_CONST(i, n);
> | ^
>
> clang:
>
> /home/eblake/qemu/qemu-img.c:1225:15: error: assigning to 'int' from
> incompatible type 'void'
> i = MIN_CONST(i, n);
> ^ ~~~~~~~~~~~~~~~
>
>
> Of course, a comment explaining the intent can't hurt either. I'll wait
> to see if this gathers any other comments before spinning a v4 with that
> change.
Please go ahead and send v4.
Thanks,
Paolo
prev parent reply other threads:[~2020-06-04 18:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-03 1:36 [PATCH v3] osdep: Make MIN/MAX evaluate arguments only once Eric Blake
2020-06-03 2:07 ` Richard Henderson
2020-06-03 2:29 ` Eric Blake
2020-06-03 15:33 ` Eric Blake
2020-06-03 16:32 ` Richard Henderson
2020-06-03 19:26 ` Eric Blake
2020-06-04 18:39 ` Paolo Bonzini [this message]
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=9ed75afd-1b82-de22-0d35-23808669ee03@redhat.com \
--to=pbonzini@redhat.com \
--cc=crosthwaite.peter@gmail.com \
--cc=dgilbert@redhat.com \
--cc=dirty.ice.hu@gmail.com \
--cc=eblake@redhat.com \
--cc=f4bug@amsat.org \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--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).