Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1690096lqt; Wed, 20 Mar 2024 11:01:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWR3uLfdn//lXu3kmNdH6YZ7rp3/MMvDqQIVQ19BPAYkR34n/gCrvS2KWSqvMyXg7SGSlja8arQFdT+/BNuD9Joqfom8GhjB3HaWGhmBg== X-Google-Smtp-Source: AGHT+IH+dCUg5k/Ka4oMBNWeOXbutwBMLm1AYebwmL6ECQs9Rq3bTOigwG7a3BGWcfLpGJ3nbEoD X-Received: by 2002:a17:902:ce10:b0:1e0:58e:88a8 with SMTP id k16-20020a170902ce1000b001e0058e88a8mr16361404plg.52.1710957705661; Wed, 20 Mar 2024 11:01:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710957705; cv=pass; d=google.com; s=arc-20160816; b=tEJDRB5GkmVvr7222GceF9GDZT+DHWPxhm05mLYc2PJTrBycyCPH9hEfC5vhO2RXSe q/8Lu+ga4qXSU9EnoJa1wyBpoj2bRxUQgnOgcLGwo11HR2v2j0fYRK48Skdzj9hHWZPw yf/4joKNbgUgY/AbvHI7CvfDWD5ErQU5BZKkFvYc7SsCLSEZVtnI9xYj1U4DHHzskPGU BUfsr9r9SQIxt8mxsGKz4v0guu6jLxqDkN0jp4TDvCUqXIIFZub6Inu7zDxSH78leuxS +ULGND8WjudcECpEap4O3gNvUkV5VOfbVQwqW1Jo9/UqN+JExrX6T8U2oex4nlaQ7eta g+4A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=r+Zc2MA+uN0Ouso8TEft5yvdLAMQHmjiC7Bg1z9QLUk=; fh=Naw3qfRnFFxa/2lUWgjbpx2CcnFL28IWTq8Z0CWG5iQ=; b=WMbhVMp74yIEJZZjpak2H1hxOZl3MvujbmYn3OOZsmqJoGOoL44uRJUXTQFCw820d6 nhZHDA0JWFbsC26VM0DSKV27t+DUGthTXpvC7dygP+Cnt1ht2zuHpVizEpHska2MSfd5 sizXzS1+eImlcettPoB8IPn8qLoFIrHHvE9DrmjikeyW3c2MPG8ZeYf2aWEQw9WbnrJt xqVe5E96cdtomMRsVgbpDo3drRt6j9XDejHTI9DQjAzmY6o+q7RmnTPf/Sni7XDEQ3Hr aarN/xTCwN1WfGVWD3JTjUxRADgpVuFfnKj4Oq3WzyBm6SkYI7SeUzZsxQMhGKTt/3BF oBTA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gwPoVxfw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-109266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109266-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s6-20020a170902ea0600b001dc8ebc1a5csi14382281plg.450.2024.03.20.11.01.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 11:01:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gwPoVxfw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-109266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109266-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1D265281A11 for ; Wed, 20 Mar 2024 18:01:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 35A526A8B5; Wed, 20 Mar 2024 18:01:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gwPoVxfw" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4ED946A35B; Wed, 20 Mar 2024 18:01:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710957699; cv=none; b=kZpmBy2Hg5te9c3hx/1ox4ZitV/ygas0LZ042ibp9bNHj1HAV6oPLPXRB9uXDukCGsljRAPbVEKbPXMsmY2LAh5B1cdF7G6iUafpZJS5ajHK1HDubVtCIdjB5Jw5UChcpSy5/+i/IDMYzeNics5OnCnTw3iuvYJgm7FE5bqGXWw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710957699; c=relaxed/simple; bh=llIBXk76Yuad8T3alnGEbUTLVx756v+KmjcXU9Ak8MA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=m8WBTCLHzLzwbsS5ufjDzjqmJW6hDrniRZAwElLx8m5/SeQVXzkMCn2vWeLjC/kPk8zJRlU0P1Un0UWILkJRXtOqGMmG/9zwja08Y/sIweWk2uTRDrMZPjuP0B8xsJ+5SKcePrQALbk3RBvUc+vpprqNrwA4Y1SQ0/oLWygxfzQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gwPoVxfw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15A32C433C7; Wed, 20 Mar 2024 18:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710957699; bh=llIBXk76Yuad8T3alnGEbUTLVx756v+KmjcXU9Ak8MA=; h=From:To:Cc:Subject:Date:From; b=gwPoVxfwRZjCBKMju8mA83r6FEoT8PmuO0bob0NvMR2jWn/xwGFZZV4uEV9mG9rh9 dSphKTn11rgn/UyOJ0FZYKqS9Xzh4No/BlfvkbzqaNaXlsLDFn/WuR5ZghgWyWx8PI 08UkSDQGGtwXwJTukevbXDLZyQo58se/7m4N6U3klbycY1A/ukx9ubUYWehVePimC3 LkIUC8IxgydlIEL138wzx6G0IezxFVc+c50zzoyGgprPF47KQok/fArXghUFejLgF0 6gB1EkNtKPlDxf8pgEIaLDEAswHWYrw62VFrl101YqgzGCvvUNSo77+VBdje65XrJV 4MsqNcq4ItQqg== From: Arnd Bergmann To: Tony Finch , Sam Ravnborg Cc: Arnd Bergmann , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , linux-kbuild@vger.kernel.org, Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH] scripts/unifdef: avoid constexpr keyword Date: Wed, 20 Mar 2024 18:59:25 +0100 Message-Id: <20240320180134.100863-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann 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. Fixes: d8379ab1dde3 ("unifdef: update to upstream revision 1.190") Cc: Masahiro Yamada Cc: Nathan Chancellor Cc: Nicolas Schier Cc: linux-kbuild@vger.kernel.org Signed-off-by: Arnd Bergmann --- scripts/unifdef.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/unifdef.c b/scripts/unifdef.c index db00e3e30a59..1cc31448fd10 100644 --- a/scripts/unifdef.c +++ b/scripts/unifdef.c @@ -203,7 +203,7 @@ static int depth; /* current #if nesting */ static int delcount; /* count of deleted lines */ static unsigned blankcount; /* count of blank lines */ static unsigned blankmax; /* maximum recent blankcount */ -static bool constexpr; /* constant #if expression */ +static bool constexpression; /* constant #if expression */ static bool zerosyms = true; /* to format symdepth output */ static bool firstsym; /* ditto */ @@ -877,7 +877,7 @@ eval_unary(const struct ops *ops, int *valp, const char **cpp) cp = skipcomment(cp); if (defparen && *cp++ != ')') return (LT_ERROR); - constexpr = false; + constexpression = false; } else if (!endsym(*cp)) { debug("eval%d symbol", ops - eval_ops); sym = findsym(cp); @@ -895,7 +895,7 @@ eval_unary(const struct ops *ops, int *valp, const char **cpp) lt = *valp ? LT_TRUE : LT_FALSE; cp = skipargs(cp); } - constexpr = false; + constexpression = false; } else { debug("eval%d bad expr", ops - eval_ops); return (LT_ERROR); @@ -955,10 +955,10 @@ ifeval(const char **cpp) int val = 0; debug("eval %s", *cpp); - constexpr = killconsts ? false : true; + constexpression = killconsts ? false : true; ret = eval_table(eval_ops, &val, cpp); debug("eval = %d", val); - return (constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret); + return (constexpression ? LT_IF : ret == LT_ERROR ? LT_IF : ret); } /* -- 2.39.2