[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.
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |