Article View: linux.kernel.git
Article #1526[PATCH] CodingGuidelines: allow compound literals
From: Phillip Wood
Date: Mon, 26 Oct 2026 14:14
Date: Mon, 26 Oct 2026 14:14
41 lines
12198 bytes
12198 bytes
From: Phillip Wood <phillip.wood@dunelm.org.uk>
Our coding guidelines say that we'll allow compound literals from
mid 2026 if no problems are reported in relation to the test balloon
added in 01e49941d6 (reftable/system: provide thin wrapper for tempfile
subsystem, 2024-11-18). As no such reports have been received, update
the guidelines to allow this construct.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
---
base-commit: 26d8d94e94df5535eecd036f16627493506a0614
Published-As: https://github.com/phillipwood/git/releases/tag/pw%2Fcoding-guidelines-allow-compound-literals%2Fv1
View-Changes-At: https://github.com/phillipwood/git/compare/26d8d94e9...a4b382c03
Fetch-It-Via: git fetch https://github.com/phillipwood/git pw/coding-guidelines-allow-compound-literals/v1
Documentation/CodingGuidelines | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index c06f5d3071..23a4d2186a 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -311,13 +311,8 @@ For C programs:
. since late 2023 with 8277dbe987 we have been using the bool type
from <stdbool.h>.
- C99 features we have test balloons for:
-
- . since late 2024 with v2.48.0-rc0~20, we have test balloons for
- compound literal syntax, e.g., (struct foo){ .member = value };
- our hope is that no platforms we care about have trouble using
- them, and officially adopt its wider use in mid 2026. Do not add
- more use of the syntax until that happens.
+ . since late 2024 with v2.48.0-rc0~20, we have been using compound
+ literals, e.g., (struct foo){ .member = value };
New C99 features that we cannot use yet:
--
2.56.0.336.g97505d19352
Technical Details
Message-ID:
<a4b382c0373e1b410c4c1ef74b313f86076d48aa.1793024062.git.phillip.wood@dunelm.org.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73338-linux-kernel-git=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73338-linux-kernel-git=dewy.ru
From: phillip.wood123@gmail.com (Phillip Wood)
Newsgroups: linux.kernel.git
Subject: [PATCH] CodingGuidelines: allow compound literals
Date: Mon, 26 Oct 2026 14:14:26 +0000
Organization: Usenet Network
Message-ID: <a4b382c0373e1b410c4c1ef74b313f86076d48aa.1793024062.git.phillip.wood@dunelm.org.uk>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="1324451"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:q9vEgjFG6vOmJo3XXIvDZrmqiqY= sha256:A5nh3mFIpTlqk4GamUmcndDZwGaqXe8CDnw6AkYjPXo=
sha1:xshTkAEohJjStm+I/utoYiR+eyc= sha256:BAFiCRfjjLzD9XxAS7gpUXDbLkByLXI9+g4QPa/8eZA=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 7A130125BAA; Mon, 26 Oct 2026 17:18:16 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.948
X-Spam-Status: No, score=-1.948 tagged_above=-9999 required=6.31
tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id XLFwsGkVdMHh;
Mon, 26 Oct 2026 17:18:13 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-73338-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 93AA9125BA9; Mon, 26 Oct 2026 17:18:01 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id E0CBA2594D; Mon, 26 Oct 2026 14:14:48 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793024088;
b=THrvJdeBVWRwT0n41omAUzKWGFiBXh1XgOio1fS5PLh6WlgfG393ZEYyOGm7QBpm+gL7
78n2/lccNKTyf46PD0RGMX+iFxC3mqOaeWK7onuxCjURvENvLARocq1HRntnGACTxschW
1ICObljQytbsHIQ3KQHgxpraZQjYNB519OYx4vP6UgPLDGoHSt51rAeU/fSLuAL6zo3yI
ZweNS3r+6jMQ2M8mVZ60jFW95xKDNrUdb66t4xGOpGiJr3LUbAQoQAJzbPJnhGFbDx+IB
CkA8uWfV2cx72ldVJq5jZR9fyRk4qbzUyYaoZMieD8i1vqI6Rpyrouuz23fqFXHRRFw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793024088;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:Reply-To:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:
Content-Transfer-Encoding;
bh=92z2woYqgS74hnLIjYTPbjzof0E5qjSVFxQiwHJ5wLU=;
b=ZkymXhvjwp544Ektj07tAKv5c4O5W7WSHBjc0zVZYofTcmUx9R2x9TeoY0zpa0SUge4u
kb4u/cyyYOn0g10qz4TCEOpygAJ2pXErKXUJKl733ug/Krw5B4bnrG3WXOxTdY9DgAMZU
X3QsHZFRXcRsr4GeaHxDVHCOKn4U5drnBOk7Uvc2PpylK6asZ10Tky9g+xXY3l6X10GTC
eOcG+P8Ht2eD3/bSkQL4kf5ykdnFXuHIz3OJsHGN1C5MbD+pFjOz6bmdostztgtjcy6He
BiF0PwAEBLX54eQJ28BJ8kjZgQRK3fCiiZzVJAb692B4h1/rGO/QaOxfzz5pQaufSVg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=BgnS10EV;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B86B4606A321;
Mon, 26 Oct 2026 14:14:48 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=BgnS10EV
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.49
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793024087;
b=TcahrAYe/Rd+AgM7jCqGIWRWCJ9NPvWUVhRkrvGUrtg9eS80DVOXVPqt/k7QLDhD0SvS
4mVdJoZDO3DPi46FPNbAiY28f5DALNXNErRugYDL7Ka+ajUa+bl4WlTHEd2aVH7uzym4x
nE2TWcJxvCPgTQ1ER8fAwA2QLmllo07pDauNDp/w7tp0v+ytXYJf6lPVrho59AGeHvO4e
9plaGNoIH5jcZ1PzGL9PJpHYTxXl5SyL20t7TE0X6fsdnmRH3F+9d0AEnm/3ScGYRA8B0
dBPrS9rhiuS3Js66gs55YYtR75+DSxjcDSmChvM3ShPlDLUIjd2Uw477xSc8LowtTGg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793024087;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
Date:Message-ID:X-Mailer:Reply-To:MIME-Version:
Content-Transfer-Encoding;
bh=92z2woYqgS74hnLIjYTPbjzof0E5qjSVFxQiwHJ5wLU=;
b=U77UI0H8RmPtUhsq/RSpf5TJeuM92JOUQ0E21n9WSsie76wI7jmoADXt0AzQhhH9lWmJ
J7kKqdRZID65JDqMQRt+0S+mzsmknt1n+ixbhLR3bxKabm7D7NXEkNtLEF0cNCVa51OiN
rAsg02s75LVf5/VXxrWNIzH6rKPk1/PCRcn22F8Iriauazn+Y3MdgsjmzVPI7ofsQJWw2
fxoSKVpfc6QWfiwbz22tNzIyNbgceVFdYSE7YpbChQygDr8WeNzwc1s+90cJ9R8zgh0E7
5gMq/ZWgUfhsP2P+p/p0TuGwslSsDs+gkICJtkEM6nC84SkwxmNJxSBBA4aE8IGe8pA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=BgnS10EV;
arc=none smtp.remote-ip=209.85.221.49
X-Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83D36606A31B
for <git@vger.kernel.org>; Mon, 26 Oct 2026 14:14:47 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 83D36606A31B
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-48df54150dfso1649910f8f.0
for <git@vger.kernel.org>; Mon, 26 Oct 2026 07:14:47 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1793024086; x=1793628886; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:reply-to:message-id:date
:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=92z2woYqgS74hnLIjYTPbjzof0E5qjSVFxQiwHJ5wLU=;
b=BgnS10EVcq/Mw0LzMkCIfinFPS0RKux0fJEa5k9//iGJbJGrbE+aP27oUsppBUpFd6
HhX2d85aAEI8Cs//xb2OxsOY1REY5dqB9SgtOVM1SpiVb4IN7oA8Xb+Fiq1KjUZCl6E1
rHBIIAylqXfPocOgV+1XMNTMZbmtrkgvf/FBMjFB2LiO/ajAtGPX64lZyB2Sp5XrU2jh
zuTNI62iwFAIQsvzPh9fDodb2lrRtojDN8zrto/CuC6A6vaCo5WciHBtWVb/HjO1YUtu
+fmy3wPccQ3GzbBQti6hobc1gz3n0iroN2mOTO1O/rgm7t1KMasCz76WDZtveJNjdiSe
Ks0A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793024086; x=1793628886;
h=content-transfer-encoding:mime-version:reply-to:message-id:date
:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=92z2woYqgS74hnLIjYTPbjzof0E5qjSVFxQiwHJ5wLU=;
b=iuk34RjvEjGyPZ0RMeomhYcUdRutkylHVTHQdoCcS+FS28ECFv6zjDD5qwx6Ksb0jz
mlXBHCoz0fr90CDWCZeGz5Q7Lt8gGW1VQYfyHwuXBu/0yUeKkR+4cBh6A5IMnXfYboPB
x77CQbtsflWasemZdXqLjDY3zaXteDaEE2KiYSVxwCHwtIGEglkHmLvWcvxzHAAXsSGj
cbSlDt5F5JCg1WN5VYf+MtcSOZEUGSJWPzn07U+h6bNFk0qHv7ubP74HVYzAepa1NyIm
/vnpfdVui1DqGY8rrxcRuW7RUsnI/XFcCV9A2055z25GRmWJ4Ud+NbpWq74qJzIwMI3G
Np2A==
X-Gm-Message-State: AFq9FYKWBNKMIqgCFA/ep51+lGdyulZ45tkncSrSlgJk4pncWMZ1uTT+
jVTaZcqbVCLIN79RBP4uAn5lVMTXcXTezNA6VCMxtjbeULz8+OBAI+H4+hR5HA==
X-Gm-Gg: AYBFou2neIlJuzdXgQ2fPzYhkjuqM/XPTYEW0Ak/CAz6y2nPmOVdIF8sQIzcMqX+Wuw
N4G/aLlqjM+O76aokvekoSuIpxZfwYWNw0NGvIFY1GVpb0IiI/uaGHbungfdxMMtWq/1NN8xcHy
15pOW7EHxjoAzI1vC66kLeNT0RPvpZUmmRPgtDfYVTxcSCfhj/M3++RbYrhAYQEMARBNyGXqlk3
2uHFZIgu2ADpXZt922HR0p3tSa9yB/r+fgA+m5yYN/c3gc9HruT1c7UrofQ2eVWfwlKyglQb83D
h7E8+wF/aeh0QmZ/MbArx6RzL1r2baf8JPhkn1SVGK2XSfGhuPbetXhdEW5Pza8jYMoXIdvrm5r
v5oPZvwlBq5ppafU3Y3368eyr/6zwpuWIAyIpr0OL058vF2hib7SCDGDwCQlcPXG18NxewJJGbY
qH+lg9EpPRhYwtwQNhUlBJPLFl3Od4htzgdUSV77vWo1+qqTOw2EcMor6xA8B/2glbekpvReNRt
fm/UD6mGgle7jrpDufnJEy+vV+NbGNZiVOqZlvTP0Gtw9h9KgmxoNr+/0uC2/JSdO5o60pVp8vO
T37M
X-Received: by 2002:a05:6000:2289:b0:48d:f6d2:9c88 with SMTP id ffacd0b85a97d-48e3eb9fe3emr13041220f8f.47.1793024085101;
Mon, 26 Oct 2026 07:14:45 -0700 (PDT)
X-Received: from berwick ([2a0a:ef40:724:6601:f3ff:aebc:61f8:d91f])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3ebc3bdbsm13707958f8f.19.2026.10.26.07.14.44
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Mon, 26 Oct 2026 07:14:44 -0700 (PDT)
X-Cc: Patrick Steinhardt <ps@pks.im>,
Phillip Wood <phillip.wood123@gmail.com>
X-Mailer: git-send-email 2.56.0.336.g97505d19352
X-Reply-To: Phillip Wood <phillip.wood@dunelm.org.uk>
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list