From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751195AbdBBJCj (ORCPT ); Thu, 2 Feb 2017 04:02:39 -0500 Received: from merlin.infradead.org ([205.233.59.134]:55594 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbdBBJCh (ORCPT ); Thu, 2 Feb 2017 04:02:37 -0500 Date: Thu, 2 Feb 2017 10:02:16 +0100 From: Peter Zijlstra To: Joe Perches Cc: Ard Biesheuvel , Laura Abbott , Will Deacon , Linus Torvalds , Markus Trippelsdorf , "linux-arm-kernel@lists.infradead.org" , Linux Kernel Mailing List , Ingo Molnar , james.greenhalgh@arm.com, Gregory Clement , Stephen Boyd Subject: Re: Build failure with v4.9-rc1 and GCC trunk -- compiler weirdness Message-ID: <20170202090216.GV6515@twins.programming.kicks-ass.net> References: <20161017183806.GG5601@arm.com> <20161019153746.GA4411@x4> <20161019155658.GB4411@x4> <20161019162222.GT9193@arm.com> <1485975894.2560.13.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1485975894.2560.13.camel@perches.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 01, 2017 at 11:04:54AM -0800, Joe Perches wrote: > > +#define order_base_2(n) \ > > +( \ > > + __builtin_constant_p(n) ? ( \ > > + ((n) < 2) ? (n) : \ > > + ilog2((n) - 1) + 1) : \ > > + __order_base_2(n) \ > > + ) > > Does this work properly when n is a signed negative value? Do you see it returning a complex number?