Re: [PATCH] [v2] scripts/unifdef: avoid constexpr keyword

From: Nicolas Schier
Date: Wed Apr 10 2024 - 03:58:36 EST


On Mon, Apr 08, 2024 at 09:17:52AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> Starting with c23, 'constexpr' is a keyword in C like in C++ and cannot
> be used as an identifier:
>
> scripts/unifdef.c:206:25: error: 'constexpr' can only be used in variable declarations
> 206 | static bool constexpr; /* constant #if expression */
> | ^
> scripts/unifdef.c:880:13: error: expected identifier or '('
> 880 | constexpr = false;
> | ^
>
> Rename this instance to allow changing to C23 at some point in the future.
>
> Cc: Masahiro Yamada <masahiroy@xxxxxxxxxx>
> Cc: Nathan Chancellor <nathan@xxxxxxxxxx>
> Cc: Nicolas Schier <nicolas@xxxxxxxxx>
> Cc: linux-kbuild@xxxxxxxxxxxxxxx
> Reviewed-By: Tony Finch <dot@xxxxxxxx>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
> v2: include fixup from Tony

thanks, LGTM.

Reviewed-by: Nicolas Schier <nicolas@xxxxxxxxx>