[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86: mark BUG()s and assertion failures as terminal.


  • To: Tim Deegan <tim@xxxxxxx>
  • From: Keir Fraser <keir.xen@xxxxxxxxx>
  • Date: Thu, 19 Sep 2013 16:13:53 +0100
  • Cc: jbeulich@xxxxxxxx, xen-devel@xxxxxxxxxxxxx
  • Delivery-date: Thu, 19 Sep 2013 15:14:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac61StoAQA3R8pLuUEKAJ7K7rb5DLA==
  • Thread-topic: [PATCH] x86: mark BUG()s and assertion failures as terminal.

On 19/09/2013 16:07, "Tim Deegan" <tim@xxxxxxx> 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@xxxxxxx>

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.