[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] misra: allow using binary literals in c99 as an extension.


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Nicola Vetrini <nicola.vetrini@xxxxxxxxx>
  • Date: Tue, 6 Jan 2026 18:50:08 +0100
  • Arc-authentication-results: i=1; bugseng.com; arc=none smtp.remote-ip=46.228.253.214
  • Arc-message-signature: i=1; d=bugseng.com; s=openarc; a=rsa-sha256; c=relaxed/relaxed; t=1767721838; h=From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=T4UUPg4ziycQ2CZJTxKm9+cjlQl10naOxSR1r3Y4jNM=; b=2C8y3b1P1mIWd7u4YOzXQ/6bF8R5I43+0MYx6fiBlljJC144lZlqVXOF+mjwZ8RLLXP4 MfBE9OGlUKQDqTI7+NI/dBIWAOhLvURWpvpKUgSyKa7Qqgxm0kAn6UX4LQ1o+D8zTQ2ua scEn8E4wcS8/+sOMWRxim/x9Fnh8wWF/RumDHwOcS/2zfUoUlvHaAXjbp0AVhOt/hwpft enPKEopnUgQ6R2xiBC62LWtqcqriXAEGdXPmKm6QpN0bVtl1fhvqss9zaBT6VCCX5zB9R b8gMJYqMiiCzeUB8Q4cOXIqfjEvsGfVxTmmUdIzBGfJczIC0m8fVzfPFEHaFW2hD45zdA ivwuWjJduGBJ6TwSpwoM1Atqi2aO8d5GKF36Kum3WyeT/EncqMcutcx2wA89Fw+9RdUf/ LPMcN+Jf475FPVJkFAVtJbNRrgYmK1gdGkVm9e8q5kGIdD1EV1akf9TdNEayvv5D0vCaw VoEXu440HhgPc5znmAlBs3QEJlYxKPEd0dZFXSdsycRV7VM2cYRKikzLgpQuFG+D4on27 ezzN0boWnlH+/zxcglSs4CJj1iz9ufkuSkQqzHf9X7/jcbHKNKkbyFeSVsKGCrSJbJAWG u9cMHlIaEwu01SDiJqJrSDCrJDbFRsEjjWIafk8ZnS9dC7Jj/FUW676q9cQG1z8=
  • Arc-seal: i=1; d=bugseng.com; s=openarc; a=rsa-sha256; cv=none; t=1767721838; b=G3abZtpGtXqYpXFEv3mZ6ALAZkKkeAFTlVjn5qS9o6xJSSgM4qchSuCMtQPTek4LVcMW p0lwZ4rOblVJX1E22edYLsmNY/YebYUq5A7Nk04SK2plR+Fq01Xbcw1/Lqt2Zc8eOEBSq Iv3jUkMypnmljB5uoZpfkkzcn5flBwEs70FET4yGKmxUnf6LbDtYdZAfYxf772vAeUKtE jmeSM+OuXrO7uFgSwSLxFoqieE5OxTPxNp7v4S7RLU0jNiunlZEd9Hn2zhaRKSe1UeDsY Ck7kuK6qVlAbakNwaCCGb2MGLCaUa85kJGzeVfM6rZbV2Wyo7y699nvfXZY/CSxgPQEVP Ql/OcKrozmmDPYfu7MH+NBI26kPL31Ibpd/e07bKPpUlBKsyF+R3yMcRty3sA91ABC1HL EVhBzeqsCWe411SK623lFoX0wwufibG9ypTBKthL+7E7ROjR1i1dXP7mR6foLb3zP8TVs wJwLgmgX0DeBgJZ9b8rWTwPYobWmrM7guh7VkTam3aGeZNfH2bd/BWb72q54JXZ0wGwKD ZN9Pl48SCyatYjh0gQGr1DGIrfLt1E5EScjXurvBLWkKbESS67wuTv2bBYbJ0vAItDJ2r bbK+/RiJ9I2cR4DLt0KaHSTVS/ZmlM1Ll8VnAm222yMx7K/dcvlmCGPzJylCVRY=
  • Authentication-results: bugseng.com; arc=none smtp.remote-ip=46.228.253.214
  • Cc: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 06 Jan 2026 17:50:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>

There is consensus towards using more binary literals in Xen,
so they are enabled both for X86_64 and ARM64.

Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
---
 automation/eclair_analysis/ECLAIR/toolchain.ecl | 5 +++++
 docs/misra/C-language-toolchain.rst             | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/automation/eclair_analysis/ECLAIR/toolchain.ecl 
b/automation/eclair_analysis/ECLAIR/toolchain.ecl
index 4bc88aa029..da00c2198a 100644
--- a/automation/eclair_analysis/ECLAIR/toolchain.ecl
+++ b/automation/eclair_analysis/ECLAIR/toolchain.ecl
@@ -332,3 +332,8 @@ ext_sizeof_alignof_void_type"
 -doc_begin="See Section \"4.13 Preprocessing Directives\" of "GCC_MANUAL" and 
Section \"11.1 Implementation-defined behavior\" of "CPP_MANUAL"."
 -config=STD.inclexpd,behavior={c99, GCC_X86_64, "specified"}
 -doc_end
+
+-doc_begin="See Section \"6.65 Binary Constants using the '0b' Prefix\" of 
"GCC_MANUAL"."
+-config=STD.ltrlbin,behavior={c99, GCC_ARM64, "specified"}
+-config=STD.ltrlbin,behavior={c99, GCC_X86_64, "specified"}
+-doc_end
diff --git a/docs/misra/C-language-toolchain.rst 
b/docs/misra/C-language-toolchain.rst
index ec0c9953be..5d418e262a 100644
--- a/docs/misra/C-language-toolchain.rst
+++ b/docs/misra/C-language-toolchain.rst
@@ -218,6 +218,10 @@ The table columns are as follows:
      - All architectures
      - See Section "6.3 Labels as Values" of GCC_MANUAL.
 
+   * - Binary constants
+     - ARM64, X86_64
+     - See Section "6.65 Binary Constants using the '0b' Prefix"
+
 Translation Limits
 __________________
 
-- 
2.52.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.