<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[MISRA Discussion Forums - 6.0 Language independent issues (C++)]]></title>
		<link>https://forum.misra.org.uk/</link>
		<description><![CDATA[MISRA Discussion Forums - https://forum.misra.org.uk]]></description>
		<pubDate>Thu, 05 Nov 2026 13:03:06 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Rule 0.1.9 - is zero-initialization considered "dead code"?]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1705</link>
			<pubDate>Wed, 25 Sep 2024 07:22:15 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=5614">cgpzs</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1705</guid>
			<description><![CDATA[Consider the following example:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>// third_party.h<br />
struct Foo<br />
{<br />
&nbsp;&nbsp; int32_t a;<br />
&nbsp;&nbsp; int32_t b;<br />
};<br />
<br />
// client.cpp<br />
Foo create()<br />
{ <br />
&nbsp;&nbsp;Foo f{};&nbsp;&nbsp;&nbsp;&nbsp; // Violates Rule 0.1.9?<br />
&nbsp;&nbsp;f.a = 123;<br />
&nbsp;&nbsp;f.b = 321;<br />
&nbsp;&nbsp;return f;<br />
}</code></div></div><br />
Does that violate Rule 0.1.9? While the initialization may be redundant, it serves a purpose as defensive programming. If we remove the zero-initialization, we risk having some members of "Foo" uninitialized, especially if we bump to a new version of "third_party.h" that adds a new member to the struct. It's safer to zero-initialize at the declaration, to ensure no members remain uninitialized.<br />
<br />
It's also preferable to initialize like this instead of "Foo f{123, 321};", because we can see written in code which field gets which value. We need to wait until C++20 to get designated initializers in C++ to initialize everything in one line.<br />
<br />
Thanks!]]></description>
			<content:encoded><![CDATA[Consider the following example:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>// third_party.h<br />
struct Foo<br />
{<br />
&nbsp;&nbsp; int32_t a;<br />
&nbsp;&nbsp; int32_t b;<br />
};<br />
<br />
// client.cpp<br />
Foo create()<br />
{ <br />
&nbsp;&nbsp;Foo f{};&nbsp;&nbsp;&nbsp;&nbsp; // Violates Rule 0.1.9?<br />
&nbsp;&nbsp;f.a = 123;<br />
&nbsp;&nbsp;f.b = 321;<br />
&nbsp;&nbsp;return f;<br />
}</code></div></div><br />
Does that violate Rule 0.1.9? While the initialization may be redundant, it serves a purpose as defensive programming. If we remove the zero-initialization, we risk having some members of "Foo" uninitialized, especially if we bump to a new version of "third_party.h" that adds a new member to the struct. It's safer to zero-initialize at the declaration, to ensure no members remain uninitialized.<br />
<br />
It's also preferable to initialize like this instead of "Foo f{123, 321};", because we can see written in code which field gets which value. We need to wait until C++20 to get designated initializers in C++ to initialize everything in one line.<br />
<br />
Thanks!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rule 0-1-11 and postfix increment/decrement operators]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1554</link>
			<pubDate>Thu, 19 Nov 2020 16:29:23 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=5040">rrosier</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1554</guid>
			<description><![CDATA[Rule 0-1-11 states that there shall be no <span style="font-style: italic;" class="mycode_i">unused </span>parameters (named or unnamed) in a non-virtual function.<br />
<br />
However, when writing a postfix increment/decrement operator, the C++ standard states:<br />
<br />
<blockquote class="mycode_quote"><cite>Quote:</cite>If the function is a member function with one parameter (which shall be of type int) or a non-member function with two parameters (the second of which shall be of type int), it defines the postfix increment operator ++ for objects of that type.<br />
...<br />
The prefix and postfix decrement operators -- are handled analogously.</blockquote>
<br />
Such operators are then written as:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>struct X {<br />
&nbsp;&nbsp;X operator++(int); // postfix a++<br />
};</code></div></div><br />
On the face of it, this seems to violate Rule 0-1-11, because the unnamed int parameter is <span style="font-style: italic;" class="mycode_i">unused</span>.<br />
<br />
Is this an real violation, so that in order to write postfix increment/decrement operators we have to deviate, or is this rule not intended to apply in such cases where the C++ standard itself is defining that the parameter is unused (and therefore any flagging of such code is a false positive)?<br />
<br />
I cannot find any direct prohibition of the writing of postfix increment/decrement operators elsewhere in the MISRA rules, so it surprises me that this rule appears to prohibit their use in this roundabout fashion.]]></description>
			<content:encoded><![CDATA[Rule 0-1-11 states that there shall be no <span style="font-style: italic;" class="mycode_i">unused </span>parameters (named or unnamed) in a non-virtual function.<br />
<br />
However, when writing a postfix increment/decrement operator, the C++ standard states:<br />
<br />
<blockquote class="mycode_quote"><cite>Quote:</cite>If the function is a member function with one parameter (which shall be of type int) or a non-member function with two parameters (the second of which shall be of type int), it defines the postfix increment operator ++ for objects of that type.<br />
...<br />
The prefix and postfix decrement operators -- are handled analogously.</blockquote>
<br />
Such operators are then written as:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>struct X {<br />
&nbsp;&nbsp;X operator++(int); // postfix a++<br />
};</code></div></div><br />
On the face of it, this seems to violate Rule 0-1-11, because the unnamed int parameter is <span style="font-style: italic;" class="mycode_i">unused</span>.<br />
<br />
Is this an real violation, so that in order to write postfix increment/decrement operators we have to deviate, or is this rule not intended to apply in such cases where the C++ standard itself is defining that the parameter is unused (and therefore any flagging of such code is a false positive)?<br />
<br />
I cannot find any direct prohibition of the writing of postfix increment/decrement operators elsewhere in the MISRA rules, so it surprises me that this rule appears to prohibit their use in this roundabout fashion.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rule 0-1-6 and Boolean variables]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1553</link>
			<pubDate>Wed, 18 Nov 2020 21:50:41 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=5392">LordMordac</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1553</guid>
			<description><![CDATA[Rule 0-1-6 seems to be counter productive with Boolean variables.  DU dataflow anomalies are normal and desirable with Boolean variables.  For example:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>extern bool random_bool ();<br />
<br />
bool non_compliant_and (void)<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b1 = random_bool();<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b2 = random_bool();<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;return b1 &amp;&amp; b2;&nbsp;&nbsp; // b2 is DU dataflow anomaly when b1 is false<br />
}<br />
<br />
bool non_compliant_or (void)<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b1 = random_bool();<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b2 = random_bool();<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;return b1 || b2;&nbsp;&nbsp; // b2 is DU dataflow anomaly when b1 is true<br />
}<br />
<br />
bool compliant_and (void)<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b1 = random_bool();<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b2 = random_bool();<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool tmp = b1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;tmp = b2 &amp;&amp; b1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;return tmp;<br />
}<br />
<br />
bool compliant_or (void)<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b1 = random_bool();<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b2 = random_bool();<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool tmp = b1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;tmp = b2 || b1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;return tmp;<br />
}</code></div></div> The compliant and non-compliant code result in different binaries. Both seem equally safe, but the compliant solution is less efficient.  Which seems at odds with the statement in MISRA spec claims <blockquote class="mycode_quote"><cite>Quote:</cite>At best this (DU dataflow anomaly) is inefficient, but may indicate a genuine problem.</blockquote>
  Is there any insight anyone can provide on such a perplexing problem?]]></description>
			<content:encoded><![CDATA[Rule 0-1-6 seems to be counter productive with Boolean variables.  DU dataflow anomalies are normal and desirable with Boolean variables.  For example:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>extern bool random_bool ();<br />
<br />
bool non_compliant_and (void)<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b1 = random_bool();<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b2 = random_bool();<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;return b1 &amp;&amp; b2;&nbsp;&nbsp; // b2 is DU dataflow anomaly when b1 is false<br />
}<br />
<br />
bool non_compliant_or (void)<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b1 = random_bool();<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b2 = random_bool();<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;return b1 || b2;&nbsp;&nbsp; // b2 is DU dataflow anomaly when b1 is true<br />
}<br />
<br />
bool compliant_and (void)<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b1 = random_bool();<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b2 = random_bool();<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool tmp = b1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;tmp = b2 &amp;&amp; b1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;return tmp;<br />
}<br />
<br />
bool compliant_or (void)<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b1 = random_bool();<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool const b2 = random_bool();<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;bool tmp = b1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;tmp = b2 || b1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;return tmp;<br />
}</code></div></div> The compliant and non-compliant code result in different binaries. Both seem equally safe, but the compliant solution is less efficient.  Which seems at odds with the statement in MISRA spec claims <blockquote class="mycode_quote"><cite>Quote:</cite>At best this (DU dataflow anomaly) is inefficient, but may indicate a genuine problem.</blockquote>
  Is there any insight anyone can provide on such a perplexing problem?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rule 0-1-6 Variables being given values that are never used.]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1522</link>
			<pubDate>Fri, 17 Jan 2020 17:34:18 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=5392">LordMordac</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1522</guid>
			<description><![CDATA[The actual rule is: <blockquote class="mycode_quote"><cite>Quote:</cite>A project shall not contain instances of non-volatile variables being given values that are never subsequently used.</blockquote>
  There has been a lot of discussion as to what that sentence actually means.  One camp believes that this rule applies to DU dataflow anomalies only, and the other believes that it applies to DU and DD dataflow anomalies.<br />
<br />
For example the following code contains a DD dataflow anomaly, but not a DU dataflow anomaly.  Is it a Rule 0-1-6 violation?<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>int32_t foobar (int32_t const value)<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;int32_t returnValue = value;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (value &lt; 0)<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returnValue = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;return returnValue;<br />
}</code></div></div><br />
This debate is influencing discussions on the merits of variable initialization.]]></description>
			<content:encoded><![CDATA[The actual rule is: <blockquote class="mycode_quote"><cite>Quote:</cite>A project shall not contain instances of non-volatile variables being given values that are never subsequently used.</blockquote>
  There has been a lot of discussion as to what that sentence actually means.  One camp believes that this rule applies to DU dataflow anomalies only, and the other believes that it applies to DU and DD dataflow anomalies.<br />
<br />
For example the following code contains a DD dataflow anomaly, but not a DU dataflow anomaly.  Is it a Rule 0-1-6 violation?<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>int32_t foobar (int32_t const value)<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;int32_t returnValue = value;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (value &lt; 0)<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returnValue = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;return returnValue;<br />
}</code></div></div><br />
This debate is influencing discussions on the merits of variable initialization.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rule 0-1-7 Exception clarification]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1504</link>
			<pubDate>Sun, 01 Sep 2019 13:36:41 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=4420">udi</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1504</guid>
			<description><![CDATA[Hi,<br />
<br />
I have 3 questions:<br />
1. Why in the exception for the rule, a C-style cast was used (like in case #1 below), instead of functional notation cast (like in case #2 below)?<br />
2. Does using a functional notation cast violates this rule?<br />
3. Is it legit to do the cast through a typedef as shown in case 3 (or 4 in case that functional notation cast is allowed for that purpose)?<br />
<br />
Thanks,<br />
Udi.<br />
==== Below are the referenced code examples ===<br />
namespace SE<br />
{<br />
	typedef void UnusedRetVal;<br />
}<br />
<br />
1.	(void)std:<img src="https://forum.misra.org.uk/images/smilies/confused.png" alt="Confused" title="Confused" class="smilie smilie_13" />trtol(pszValue, &amp;pszEndPtr, 10);			// copmliant<br />
2.	void(std:<img src="https://forum.misra.org.uk/images/smilies/confused.png" alt="Confused" title="Confused" class="smilie smilie_13" />trtol(pszValue, &amp;pszEndPtr, 10));			// not compliant ?<br />
3.	(SE::UnusedRetVal)std:<img src="https://forum.misra.org.uk/images/smilies/confused.png" alt="Confused" title="Confused" class="smilie smilie_13" />trtol(pszValue, &amp;pszEndPtr, 10);	// not compliant ?<br />
4.	SE::UnusedRetVal(std:<img src="https://forum.misra.org.uk/images/smilies/confused.png" alt="Confused" title="Confused" class="smilie smilie_13" />trtol(pszValue, &amp;pszEndPtr, 10));	// not compliant ?]]></description>
			<content:encoded><![CDATA[Hi,<br />
<br />
I have 3 questions:<br />
1. Why in the exception for the rule, a C-style cast was used (like in case #1 below), instead of functional notation cast (like in case #2 below)?<br />
2. Does using a functional notation cast violates this rule?<br />
3. Is it legit to do the cast through a typedef as shown in case 3 (or 4 in case that functional notation cast is allowed for that purpose)?<br />
<br />
Thanks,<br />
Udi.<br />
==== Below are the referenced code examples ===<br />
namespace SE<br />
{<br />
	typedef void UnusedRetVal;<br />
}<br />
<br />
1.	(void)std:<img src="https://forum.misra.org.uk/images/smilies/confused.png" alt="Confused" title="Confused" class="smilie smilie_13" />trtol(pszValue, &amp;pszEndPtr, 10);			// copmliant<br />
2.	void(std:<img src="https://forum.misra.org.uk/images/smilies/confused.png" alt="Confused" title="Confused" class="smilie smilie_13" />trtol(pszValue, &amp;pszEndPtr, 10));			// not compliant ?<br />
3.	(SE::UnusedRetVal)std:<img src="https://forum.misra.org.uk/images/smilies/confused.png" alt="Confused" title="Confused" class="smilie smilie_13" />trtol(pszValue, &amp;pszEndPtr, 10);	// not compliant ?<br />
4.	SE::UnusedRetVal(std:<img src="https://forum.misra.org.uk/images/smilies/confused.png" alt="Confused" title="Confused" class="smilie smilie_13" />trtol(pszValue, &amp;pszEndPtr, 10));	// not compliant ?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rule 0-1-3/0-1-4/0-1-5 and (template) class members]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1309</link>
			<pubDate>Wed, 01 Feb 2017 18:11:35 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=3331">grunwald</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1309</guid>
			<description><![CDATA[Do these rules apply to class members?<br />
<br />
If so, do they apply to instances of template class members?<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>template<br />
class C {<br />
&nbsp;&nbsp;&nbsp;&nbsp;T member1; // never used; compliant with 0-1-3?<br />
&nbsp;&nbsp;&nbsp;&nbsp;T member2; // C::member2 is used but C::member2 is not; compliant with 0-1-3?<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;typedef T Unused; // typedef never used: non-compliant with 0-1-5.<br />
&nbsp;&nbsp;&nbsp;&nbsp;typedef T X; // C::X is used but C::X is not; compliant with 0-1-5?<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;void call() { // only instantiated for C<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use(static_cast(member2));<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
};<br />
<br />
int main() {<br />
&nbsp;&nbsp;C().call();<br />
&nbsp;&nbsp;C();<br />
}</code></div></div><br />
The same question also applies to 0-1-4.<br />
<br />
For 0-1-10 the situation is different, as class template member functions only get instantiated if they actually used. Thus C::call() is compliant with 0-1-10. A completely unused class template member function would be non-compliant with Rule 14-7-1.]]></description>
			<content:encoded><![CDATA[Do these rules apply to class members?<br />
<br />
If so, do they apply to instances of template class members?<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>template<br />
class C {<br />
&nbsp;&nbsp;&nbsp;&nbsp;T member1; // never used; compliant with 0-1-3?<br />
&nbsp;&nbsp;&nbsp;&nbsp;T member2; // C::member2 is used but C::member2 is not; compliant with 0-1-3?<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;typedef T Unused; // typedef never used: non-compliant with 0-1-5.<br />
&nbsp;&nbsp;&nbsp;&nbsp;typedef T X; // C::X is used but C::X is not; compliant with 0-1-5?<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;void call() { // only instantiated for C<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use(static_cast(member2));<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
};<br />
<br />
int main() {<br />
&nbsp;&nbsp;C().call();<br />
&nbsp;&nbsp;C();<br />
}</code></div></div><br />
The same question also applies to 0-1-4.<br />
<br />
For 0-1-10 the situation is different, as class template member functions only get instantiated if they actually used. Thus C::call() is compliant with 0-1-10. A completely unused class template member function would be non-compliant with Rule 14-7-1.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Proposal: Rule 0-1-4 exception]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1291</link>
			<pubDate>Thu, 27 Oct 2016 11:16:35 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=4389">dg1980</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1291</guid>
			<description><![CDATA[Exception: Variables which are written by the program but read by an external entity (e.g. ASAM MCD tools like Vector CANape) are not considered a violation of this rule.]]></description>
			<content:encoded><![CDATA[Exception: Variables which are written by the program but read by an external entity (e.g. ASAM MCD tools like Vector CANape) are not considered a violation of this rule.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Proposal: Rule 0-1-3 exception]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1290</link>
			<pubDate>Thu, 27 Oct 2016 11:09:00 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=4389">dg1980</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1290</guid>
			<description><![CDATA[Dear MISRA team,<br />
<br />
we have certain variables which are required by our boot loader (a separate binary) but are not used in the main program itself.<br />
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.<br />
Therefore i would like to propose the following addendum to rule 0-1-3:<br />
<br />
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.]]></description>
			<content:encoded><![CDATA[Dear MISRA team,<br />
<br />
we have certain variables which are required by our boot loader (a separate binary) but are not used in the main program itself.<br />
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.<br />
Therefore i would like to propose the following addendum to rule 0-1-3:<br />
<br />
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.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rule 0-1-9]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1276</link>
			<pubDate>Wed, 28 Sep 2016 12:52:24 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=4389">dg1980</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1276</guid>
			<description><![CDATA[Please add an explicit exception for static_assert if the next MISRA C++ version allows C++11.<br />
Thanks.]]></description>
			<content:encoded><![CDATA[Please add an explicit exception for static_assert if the next MISRA C++ version allows C++11.<br />
Thanks.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[0-1-2 Infeasible paths clarification]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1032</link>
			<pubDate>Thu, 06 Mar 2014 10:56:41 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=3152">melinda.bradury</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1032</guid>
			<description><![CDATA[I have a pure virtual function like<br />
virtual void OnEvent(EventName event, State&amp; superState) = 0;<br />
<br />
For some of the derived classes, the implementation uses both of the the parameters. For others, the parameters are not used at all.<br />
<br />
Is this acceptable?]]></description>
			<content:encoded><![CDATA[I have a pure virtual function like<br />
virtual void OnEvent(EventName event, State&amp; superState) = 0;<br />
<br />
For some of the derived classes, the implementation uses both of the the parameters. For others, the parameters are not used at all.<br />
<br />
Is this acceptable?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[0-1-8. Exception: empty interface function.]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=998</link>
			<pubDate>Mon, 18 Nov 2013 13:55:49 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=2945">Alex-R</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=998</guid>
			<description><![CDATA[0-1-8:<br />
The following are examples of external side effects:<br />
â€¢	Reading or writing to a ile, stream, etc.;<br />
â€¢	Changing the value of a non local variable;<br />
â€¢	Changing the value of an argument having reference type;<br />
â€¢	Using a volatile object;<br />
â€¢	Raising an exception.<br />
<br />
<br />
Situation:<br />
There is some mouse interface: OnMouseUp, OnMouseDone, OnMouseMove... or some other manipulator interface... does not matter... <br />
There are some objects that use this interface but not all objects need all functions, so it is possible:<br />
void SomeObject::OnMouseMove ( uint32  x, uint32 y)<br />
{<br />
    //do nothing<br />
}]]></description>
			<content:encoded><![CDATA[0-1-8:<br />
The following are examples of external side effects:<br />
â€¢	Reading or writing to a ile, stream, etc.;<br />
â€¢	Changing the value of a non local variable;<br />
â€¢	Changing the value of an argument having reference type;<br />
â€¢	Using a volatile object;<br />
â€¢	Raising an exception.<br />
<br />
<br />
Situation:<br />
There is some mouse interface: OnMouseUp, OnMouseDone, OnMouseMove... or some other manipulator interface... does not matter... <br />
There are some objects that use this interface but not all objects need all functions, so it is possible:<br />
void SomeObject::OnMouseMove ( uint32  x, uint32 y)<br />
{<br />
    //do nothing<br />
}]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rules 0-1-3, 0-1-4, 0-1-5 and 0-1-8. External libs.]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=997</link>
			<pubDate>Mon, 18 Nov 2013 13:17:11 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=2945">Alex-R</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=997</guid>
			<description><![CDATA[Rules 0-1-3, 0-1-4, 0-1-5 and 0-1-8 could have exception as using external libs.<br />
The could be include external lib header or involved lib external sources that have more functionality than uses the project.<br />
<br />
Yes?]]></description>
			<content:encoded><![CDATA[Rules 0-1-3, 0-1-4, 0-1-5 and 0-1-8 could have exception as using external libs.<br />
The could be include external lib header or involved lib external sources that have more functionality than uses the project.<br />
<br />
Yes?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[0-1-8 and OO design pattern]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=916</link>
			<pubDate>Tue, 02 Oct 2012 06:03:23 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=2268">masha</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=916</guid>
			<description><![CDATA[0-1-8 restricts such elegant design pattern as e. g. observer/listener (with selective handling of a subset of notifications by observer).<br />
So is the "intended" use of empty virtual methods due to design OK? May design goals be classified as "side effect"?]]></description>
			<content:encoded><![CDATA[0-1-8 restricts such elegant design pattern as e. g. observer/listener (with selective handling of a subset of notifications by observer).<br />
So is the "intended" use of empty virtual methods due to design OK? May design goals be classified as "side effect"?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Just to be clear on 0-1-8 ...]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=794</link>
			<pubDate>Fri, 19 Nov 2010 18:56:03 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=64">gs</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=794</guid>
			<description><![CDATA[The standard library implementation here has the body of one of the standard library functions defined as, literally, "{ }".  The function does not do anything except go, "Yes, I have been called."  Did MISRA intend to prohibit such a definition with respect to 0-1-8?]]></description>
			<content:encoded><![CDATA[The standard library implementation here has the body of one of the standard library functions defined as, literally, "{ }".  The function does not do anything except go, "Yes, I have been called."  Did MISRA intend to prohibit such a definition with respect to 0-1-8?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Notion of unused parameter in 0-1-11 and 0-1-12]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=759</link>
			<pubDate>Sun, 25 Jul 2010 14:58:42 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=606">roberto</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=759</guid>
			<description><![CDATA[Suppose `a' is a parameter.  Does `sizeof(a)' count as a use of `a' for the purpose of compliance to 0-1-11 and 0-1-12?]]></description>
			<content:encoded><![CDATA[Suppose `a' is a parameter.  Does `sizeof(a)' count as a use of `a' for the purpose of compliance to 0-1-11 and 0-1-12?]]></content:encoded>
		</item>
	</channel>
</rss>