MISRA Discussion Forums
Proposal: Rule 0-1-3 exception - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA C++ (https://forum.misra.org.uk/forumdisplay.php?fid=18)
+--- Forum: MISRA C++:2008 rules (https://forum.misra.org.uk/forumdisplay.php?fid=19)
+---- Forum: 6.0 Language independent issues (C++) (https://forum.misra.org.uk/forumdisplay.php?fid=129)
+---- Thread: Proposal: Rule 0-1-3 exception (/showthread.php?tid=1290)



Proposal: Rule 0-1-3 exception - dg1980 - 27-10-2016

Dear MISRA team,

we have certain variables which are required by our boot loader (a separate binary) but are not used in the main program itself.
In my book, this is not a violation of 0-1-3, because clearly those variables have a usage, albeit one that static analysis cannot prove.
Therefore i would like to propose the following addendum to rule 0-1-3:

Exception: a variable which is required by an external binary program only (e.g. an embedded systems boot loader) is not considered a violation of this rule.


Re: Proposal: Rule 0-1-3 exception - mishak - 27-10-2016

I can understand the issue here, but I'm not sure how an exception would help as a tool would not know when it applied.

Seems like you have a good justification for a deviation - the use-case fits nicely with the concept of "Permits" within MISRA Compliance, meaning most of the work required can be re-used across projects.


Re: Proposal: Rule 0-1-3 exception - dg1980 - 27-10-2016

mishak Wrote:I can understand the issue here, but I'm not sure how an exception would help as a tool would not know when it applied.

Seems like you have a good justification for a deviation - the use-case fits nicely with the concept of "Permits" within MISRA Compliance, meaning most of the work required can be re-used across projects.
Yeah, maybe the use case is even common enough so that a MISRA C++:2008 permits document can be started like they did for C:2004 (https://misra.org.uk/forum/viewtopic.php?f=241&t=1562).


Re: Proposal: Rule 0-1-3 exception - misra cpp - 24-01-2017

We'd agree with mishak, the case you describe certainly justifies a deviation, but isn't common enough or sufficiently machine checkable to justify an exception