From nobody Mon Apr 6 18:25:49 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 A20023FB051 for ; Wed, 18 Mar 2026 16:13:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773850387; cv=none; b=TSCe0MNDFvexC+K087Q1JmWwZYDDyDN4kQMV7eU4vX/+rm9uTn4MrMRRW2JJKXQrRfVS4vKISqIFq5Ys/PTyUqT3b3mFhTtYWrMfYNvhjCBaFNs6BkS/gwVdQbyuPfxyIizSBEZclHG154y5XDWd+HFl5YFwES84gB3A+khsAvM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773850387; c=relaxed/simple; bh=85Diy7GUBXLSAWxAYzh21+PylcJpTAPCWo5ODektK10=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NMe58spgEEz3RyeW0dDhd0t5ElQR6pP3NlzTFUgRcu+FpV7HTTix/RZ+JTGTaFQzl1CM7OnOjIPFVkyt7cg4A6gC8Qsflik3oZWHzW31LDo+ozP+aeCOaLaNFk/MUKxo+oEB137aR3HoRHj9MZcM4AsF3yQp6O+qaaa/Mov2WJw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=LNfZuG1M; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="LNfZuG1M" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1773850379; bh=85Diy7GUBXLSAWxAYzh21+PylcJpTAPCWo5ODektK10=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=LNfZuG1M9QkAhFjgcwXOSRFXgKoX1I+6lV+v3xfb7yBRzvCXK74To2cugakZuQLHp ryz6Tw/170uuYmZVhrWv5+s8lecl+/sjDgUIGyTCWJX4EFvzgZnD2ECeRljODCUIRK vo1ZL3KzxmxmfaYqVnInvRn5L0uSu1MmEpYLnfmg= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Wed, 18 Mar 2026 17:12:42 +0100 Subject: [PATCH 1/2] tools/nolibc: avoid -Wundef warning for __STDC_VERSION__ Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260318-nolibc-wundef-v1-1-fcb7f9ac7298@weissschuh.net> References: <20260318-nolibc-wundef-v1-0-fcb7f9ac7298@weissschuh.net> In-Reply-To: <20260318-nolibc-wundef-v1-0-fcb7f9ac7298@weissschuh.net> To: Willy Tarreau Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1773850378; l=1442; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=85Diy7GUBXLSAWxAYzh21+PylcJpTAPCWo5ODektK10=; b=efRB4BpGgGgyuvXaxqQhNmUeuzREsYbz7/FUPap/Jc6B0Zr6Hn+uJZaeCMry/rZM0SVpgAZbI 9vha3YtCZadDw80thhzLcmRQHJt7jdGRojmN2umBgDfQWv6HXI9j2OT X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= With -std=3Dc89 the macro __STDC_VERSION__ is not defined. While undefined identifiers in '#if' directives are assumed to be '0', with -Wundef a warning is emitted. Avoid the warning by explicitly falling back to '0' if __STDC_VERSION__ is not provided by the preprocessor. Fixes: 37219aa5b123 ("tools/nolibc: add __nolibc_static_assert()") Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/include/nolibc/compiler.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/include/nolibc/compiler.h b/tools/include/nolibc/compile= r.h index f03f84cfadce..dac09badff0a 100644 --- a/tools/include/nolibc/compiler.h +++ b/tools/include/nolibc/compiler.h @@ -47,6 +47,12 @@ # define __nolibc_fallthrough do { } while (0) #endif /* __nolibc_has_attribute(fallthrough) */ =20 +#ifdef __STDC_VERSION__ +# define __nolibc_stdc_version __STDC_VERSION__ +#else +# define __nolibc_stdc_version 0 +#endif + #define __nolibc_version(_major, _minor, _patch) ((_major) * 10000 + (_min= or) * 100 + (_patch)) =20 #ifdef __GNUC__ @@ -63,7 +69,7 @@ # define __nolibc_clang_version 0 #endif /* __clang__ */ =20 -#if __STDC_VERSION__ >=3D 201112L || \ +#if __nolibc_stdc_version >=3D 201112L || \ __nolibc_gnuc_version >=3D __nolibc_version(4, 6, 0) || \ __nolibc_clang_version >=3D __nolibc_version(3, 0, 0) # define __nolibc_static_assert(_t) _Static_assert(_t, "") --=20 2.53.0