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

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



commit bbad59569e06e4dad21d09195990e48c6409db7b
Author:     Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
AuthorDate: Tue Jan 6 18:50:08 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Jan 8 18:50:27 2026 +0000

    misra: allow using binary literals in c99 as an extension.
    
    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>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 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
 __________________
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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