On 2/25/19 1:43 PM, Julien Grall wrote:
Hi,

On 22/02/2019 10:27, Andrew Cooper wrote:
On 22/02/2019 09:57, Oleksandr Andrushchenko wrote:
From: Oleksandr Andrushchenko <[email protected]>

Hello, everybody!

We at EPAM Systems would like to present first series of patches targeting Xen on ARM Functional Safety certification (ISO61508 based): implementation of MISRA [1] C:2012 Rule 16.4 which requires that every switch statement has a
default label as a measure of defensive programming technique.

Hang on - what?

Can someone attempt to justify why actively breaking -Wswitch is going
to result in safer/better code?

I just discovered that GCC has an option -Wswitch-enum that would warn of missing element even in the presence of the 'default' label. I guess this could help us to reunite MISRA and Xen for this rule?

And still your comment on plain integers in another thread is still valid.
So, it only partially solves the issue.
Cheers,



_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to