On 2025-03-07 19:30, Andrew Cooper wrote:
On 07/03/2025 6:22 pm, Nicola Vetrini wrote:
On 2025-03-07 18:54, Andrew Cooper wrote:
and these too, but will require MISRA adjustments:
* _Generic() to make properly const-preserving wrappers
Perhaps stating something that is already well-known, but this
effectively means moving from MISRA C:2012 Amendment 2 as a target to,
at least, MISRA C:2012 Amendment 3, as that version contains rules in
series 23 for _Generic.
Yes, I was expecting something along these lines. It's also why I
don't
suggest we start using it immediately. (There's *loads* of non-MISRA
related work to do when these changes get accepted.)
Part of the justification for doing the MISRA work upstream was so it
could stay "clean" on an ongoing basis. The corollary to this is that
our choice of MISRA standard needs to adapt as upstream Xen changes.
Do you have any insight on how disruptive this would be? I presume
it's
not as simple as running sed over our docs and Eclair config, but I
also
don't imagine it's a giant task either.
Yes, indeed. I needs a global re-evaluation due to new rules being
introduced (e.g. _Noreturn handling gets its own rules in Amendment 3)
so those would need to be discussed in-depth, but the impact is probably
not dramatic overall in terms of configuration changes, as most of the
rules are unchanged.
~Andrew
--
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253