From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] x86: mark BUG()s and assertion failures as terminal. Date: Thu, 19 Sep 2013 16:13:53 +0100 Message-ID: References: <20130919150729.GK52431@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130919150729.GK52431@ocelot.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: jbeulich@suse.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 19/09/2013 16:07, "Tim Deegan" 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