[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YKeghxRY4FeOKuwb@smile.fi.intel.com>
Date: Fri, 21 May 2021 14:59:03 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Rikard Falkeborn <rikard.falkeborn@...il.com>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Yury Norov <yury.norov@...il.com>,
linux-kernel@...r.kernel.org, Ard Biesheuvel <ardb@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] linux/bits.h: Fix compilation error with GENMASK
On Thu, May 20, 2021 at 01:41:12PM -0700, Andrew Morton wrote:
> On Tue, 11 May 2021 22:37:15 +0200 Rikard Falkeborn <rikard.falkeborn@...il.com> wrote:
>
> > --- a/include/linux/const.h
> > +++ b/include/linux/const.h
> > @@ -3,4 +3,12 @@
> >
> > #include <vdso/const.h>
> >
> > +/*
> > + * This returns a constant expression while determining if an argument is
> > + * a constant expression, most importantly without evaluating the argument.
> > + * Glory to Martin Uecker <Martin.Uecker@....uni-goettingen.de>
> > + */
> > +#define __is_constexpr(x) \
> > + (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
>
> Boggle.
>
> Could someone please sometime enhance that comment a bit? What need
> does this thing satisfy and how on earth does it work?
Some summary based on (links from) https://vegard.wiki/w/is_constexpr() ?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists