From: Keir Fraser <keir.xen@gmail.com>
To: Tim Deegan <tim@xen.org>
Cc: jbeulich@suse.com, xen-devel@lists.xen.org
Subject: Re: [PATCH] x86: mark BUG()s and assertion failures as terminal.
Date: Thu, 19 Sep 2013 16:13:53 +0100 [thread overview]
Message-ID: <CE60D341.33DAC%keir.xen@gmail.com> (raw)
In-Reply-To: <20130919150729.GK52431@ocelot.phlegethon.org>
On 19/09/2013 16:07, "Tim Deegan" <tim@xen.org> wrote:
>>> +#if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5))
>>
>> Do you mean for gcc-3.4 to use __builtin_unreachable()?
>
> No, what I want is for clang and all GCCs >= 4.5 to use the builtin.
Then this original #if doesn't correctly handle __GNUC__ < 4.
>> This might be
>> clearer, correcter, and better match the prevailing compiler.h style, if it
>> was switched round to handle the __builtin_unreachable() case first.
>
> Switched around, it looks like this:
>
> #if (defined(__clang__) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) ||
> (__GNUC__ > 4))
> #define unreachable() __builtin_unreachable()
> #else
> #define unreachable() do {} while (1)
> #endif
>
> Not sure that's any clearer or correcter, really.
Well the GCC version check is correct in this one.
Looks good to me. Replace this hunk in the original patch and you can have
my ack:
Acked-by: Keir Fraser <keir@xen.org>
-- Keir
next prev parent reply other threads:[~2013-09-19 15:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-19 14:39 [PATCH] x86: mark BUG()s and assertion failures as terminal Tim Deegan
2013-09-19 14:56 ` Keir Fraser
2013-09-19 15:07 ` Tim Deegan
2013-09-19 15:10 ` Tim Deegan
2013-09-19 15:17 ` Keir Fraser
2013-09-19 15:13 ` Keir Fraser [this message]
2013-09-19 15:44 ` Andrew Cooper
2013-09-19 16:52 ` Tim Deegan
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=CE60D341.33DAC%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=jbeulich@suse.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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).