[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] docs/misra/rules.rst: add rule 5.5
commit 487838f13ab3d3b6e0a85e982734732c14591000 Author: Stefano Stabellini <sstabellini@xxxxxxxxxx> AuthorDate: Thu Mar 14 17:35:03 2024 -0700 Commit: Stefano Stabellini <stefano.stabellini@xxxxxxx> CommitDate: Tue Apr 16 12:14:32 2024 -0700 docs/misra/rules.rst: add rule 5.5 Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx> Acked-by: Bertrand Marquis <bertrand.marquis@xxxxxxx> --- docs/misra/rules.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 86f4ad0ab3..d3159af917 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -181,6 +181,21 @@ maintainers if you want to suggest a change. headers (xen/include/public/) are allowed to retain longer identifiers for backward compatibility. + * - `Rule 5.5 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_05.c>`_ + - Required + - Identifiers shall be distinct from macro names + - Macros expanding to their own name are allowed, e.g.:: + + #define x x + + Clashes between names of function-like macros and identifiers of + non-callable entities are allowed. Callable entities having an + identifier that is the same of the name of a + function-like macro are not allowed. Example (not allowed):: + + #define f(x, y) f(x, y) + void f(int x, int y); + * - `Rule 5.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_06.c>`_ - Required - A typedef name shall be a unique identifier -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |