lkml.org 
[lkml]   [2024]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [v2] scripts/unifdef: avoid constexpr keyword
On Mon, Apr 08, 2024 at 09:17:52AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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@kernel.org>
> Cc: Nathan Chancellor <nathan@kernel.org>
> Cc: Nicolas Schier <nicolas@fjasle.eu>
> Cc: linux-kbuild@vger.kernel.org
> Reviewed-By: Tony Finch <dot@dotat.at>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: include fixup from Tony

thanks, LGTM.

Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>

\
 
 \ /
  Last update: 2024-05-27 16:32    [W:2.226 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site