From mboxrd@z Thu Jan 1 00:00:00 1970 From: joe@perches.com (Joe Perches) Date: Wed, 01 Feb 2017 12:34:01 -0800 Subject: Build failure with v4.9-rc1 and GCC trunk -- compiler weirdness In-Reply-To: References: <20161017183806.GG5601@arm.com> <20161019153746.GA4411@x4> <20161019155658.GB4411@x4> <20161019162222.GT9193@arm.com> <1485975894.2560.13.camel@perches.com> <1485978587.2560.15.camel@perches.com> Message-ID: <1485981241.2560.20.camel@perches.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, 2017-02-01 at 19:53 +0000, Ard Biesheuvel wrote: > On 1 February 2017 at 19:49, Joe Perches wrote: [] > > Or maybe add a BUILD_BUG_ON something like: > > > > #define order_base_2(n) \ > > ({ \ > > typeof(n) _n = n; \ > > BUILD_BUG_ON(__builtin_constant_p(_n) && _n < 0); \ > > __builtin_constant_p(_n) ? (_n < 2 ? _n : ilog2((_n) - 1) + 1)) \ > > : __order_base_2(_n); \ > > }) > > > > This would interfere with the ability to use order_base_2() in > initializers for global variables. There aren't any as far as I can tell and would using order_base_2() for a global initializer make sense?