Re: [PATCH] compiler.h: Explain how __is_constexpr() works

From: Andy Shevchenko
Date: Fri Mar 01 2024 - 20:18:52 EST


Thu, Feb 29, 2024 at 08:44:37PM -0800, Kees Cook kirjoitti:
> The __is_constexpr() macro is dark magic. Shed some light on it with
> a comment to explain how and why it works.

I was under impression that somebody did it already once and it fell through
cracks when has been moved (?) to compiler.h.

Ah, now I see it, https://lore.kernel.org/all/YKeghxRY4FeOKuwb@xxxxxxxxxxxxxxxxxx/.
It was asked, but till now never fulfilled (maybe Reported-by:/Closes: tag?).

And explanation before was given here:
https://stackoverflow.com/questions/49481217/linux-kernels-is-constexpr-macro.

--
With Best Regards,
Andy Shevchenko