Re: [PATCH v2 2/3] kernel.h: hide __is_constexpr() from sparse

From: Luc Van Oostenryck
Date: Fri Nov 16 2018 - 19:45:08 EST


On Fri, Nov 09, 2018 at 10:35:33AM +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@xxxxxxxxx>
>
> __is_constexpr() is a work of art, understandable only to the most
> respected wizards of C. Even sparse doesn't seem to belong to that
> group and warns that there's an "expression using sizeof(void)".
>
> Just hide the definition from sparse and pretend it's always true.

The development version of sparse doesn't issues a warning for
sizeof(void) soon after the introduction of __is_constexpr()
and sparse's main tree have been updated (very recently).

I strongly believe this patch shouldn't be.

Regards,
-- Luc