[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.
At 15:56 +0100 on 19 Sep (1379606210), Keir Fraser wrote: > On 19/09/2013 15:39, "Tim Deegan" <tim@xxxxxxx> wrote: > > @@ -14,6 +14,12 @@ > > #define always_inline __inline__ __attribute__ ((always_inline)) > > #define noinline __attribute__((noinline)) > > > > +#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. > 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. Tim. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |