Proposal: Rule 0-1-3 exception

Moderators: david ward, misra cpp

Post Reply
dg1980
Posts: 109
Joined: Wed Apr 27, 2016 2:33 pm
Company: Elektrobit Automotive GmbH

Proposal: Rule 0-1-3 exception

Post by dg1980 » Thu Oct 27, 2016 12:09 pm

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.

mishak
Posts: 10
Joined: Thu Jun 21, 2007 3:58 pm

Re: Proposal: Rule 0-1-3 exception

Post by mishak » Thu Oct 27, 2016 12:17 pm

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.

dg1980
Posts: 109
Joined: Wed Apr 27, 2016 2:33 pm
Company: Elektrobit Automotive GmbH

Re: Proposal: Rule 0-1-3 exception

Post by dg1980 » Thu Oct 27, 2016 12:23 pm

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).

misra cpp
Posts: 148
Joined: Mon Jun 02, 2008 1:55 pm
Company: MISRA

Re: Proposal: Rule 0-1-3 exception

Post by misra cpp » Tue Jan 24, 2017 9:43 am

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
Posted by and on behalf of
the MISRA C++ Working Group

Post Reply

Return to “6.0 Language independent issues (C++)”