<?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 - MISRA AC AGC discussions]]></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:27 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[MISRA AC AGC vs. MISRA-C:2012-Appendix-E]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1391</link>
			<pubDate>Wed, 13 Dec 2017 12:34:47 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=4695">msteding</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1391</guid>
			<description><![CDATA[Hello community,<br />
<br />
recently, I bought the publication "MISRA AC AGC - Guidelines for the application of MISRA-C:2004 in the context of automatic code generation".<br />
I bought this document because my code analyzer tools POLYSPACE from MATHWORKS support the analysis based on either MISRA-C:2004, MISRA-C:2012 or MISRA AC AC. As the latter one is based on MISRA-C:2004 I wonder, whether the standard MISRA-C:2012 with the exceptions resp. modifications described in Appendix E would be the 'better' choice?<br />
<br />
Thank you for any response and<br />
Best Regards.<br />
  Manfred]]></description>
			<content:encoded><![CDATA[Hello community,<br />
<br />
recently, I bought the publication "MISRA AC AGC - Guidelines for the application of MISRA-C:2004 in the context of automatic code generation".<br />
I bought this document because my code analyzer tools POLYSPACE from MATHWORKS support the analysis based on either MISRA-C:2004, MISRA-C:2012 or MISRA AC AC. As the latter one is based on MISRA-C:2004 I wonder, whether the standard MISRA-C:2012 with the exceptions resp. modifications described in Appendix E would be the 'better' choice?<br />
<br />
Thank you for any response and<br />
Best Regards.<br />
  Manfred]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Regd-Rule 12.6 and 12.7]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1142</link>
			<pubDate>Fri, 23 Jan 2015 03:54:13 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=3688">Nasi</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1142</guid>
			<description><![CDATA[The following code is Auto generated code from Embedded Coder of Matlab Simulink.<br />
<br />
 <div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>tmp = Common_Signal_Process_DWork.UnitDelay_DSTATE_b[1] * ((int16_T)(16384 -<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Common_Signal_Process_DWork.UnitDelay3_DSTATE_d));<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;/* Switch: '/Thrs~=4' incorporates:<br />
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;Product: '/Product1'<br />
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;Switch: '/Thrs~=3'<br />
&nbsp;&nbsp;&nbsp;&nbsp; */<br />
&nbsp;&nbsp;&nbsp;&nbsp;rtb_Thrs5_idx_1 = (int16_T)((tmp &gt;&gt; 14) + ((tmp &amp; 8192) != 0));<br />
&nbsp;&nbsp;&nbsp;&nbsp;rtb_Thrs5_idx_2 = Common_Signal_Process_DWork.UnitDelay_DSTATE_b[2];<br />
&nbsp;&nbsp;&nbsp;&nbsp;rtb_Thrs5_idx_3 = Common_Signal_Process_DWork.UnitDelay_DSTATE_b[3];<br />
&nbsp;&nbsp;}</code></div></div><br />
<br />
<span style="color: #FF0000;" class="mycode_color"> rtb_Thrs5_idx_1 = (int16_T)((tmp &gt;&gt; 14) + (<span style="font-weight: bold;" class="mycode_b">(tmp &amp; 8192) != 0)</span>);</span><br />
On the Highlighted code above, we are getting MISRA-C 12.6 and 12.7 Rule violations. How to remove this violation?]]></description>
			<content:encoded><![CDATA[The following code is Auto generated code from Embedded Coder of Matlab Simulink.<br />
<br />
 <div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>tmp = Common_Signal_Process_DWork.UnitDelay_DSTATE_b[1] * ((int16_T)(16384 -<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Common_Signal_Process_DWork.UnitDelay3_DSTATE_d));<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;/* Switch: '/Thrs~=4' incorporates:<br />
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;Product: '/Product1'<br />
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;Switch: '/Thrs~=3'<br />
&nbsp;&nbsp;&nbsp;&nbsp; */<br />
&nbsp;&nbsp;&nbsp;&nbsp;rtb_Thrs5_idx_1 = (int16_T)((tmp &gt;&gt; 14) + ((tmp &amp; 8192) != 0));<br />
&nbsp;&nbsp;&nbsp;&nbsp;rtb_Thrs5_idx_2 = Common_Signal_Process_DWork.UnitDelay_DSTATE_b[2];<br />
&nbsp;&nbsp;&nbsp;&nbsp;rtb_Thrs5_idx_3 = Common_Signal_Process_DWork.UnitDelay_DSTATE_b[3];<br />
&nbsp;&nbsp;}</code></div></div><br />
<br />
<span style="color: #FF0000;" class="mycode_color"> rtb_Thrs5_idx_1 = (int16_T)((tmp &gt;&gt; 14) + (<span style="font-weight: bold;" class="mycode_b">(tmp &amp; 8192) != 0)</span>);</span><br />
On the Highlighted code above, we are getting MISRA-C 12.6 and 12.7 Rule violations. How to remove this violation?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rule 10.4]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1064</link>
			<pubDate>Thu, 12 Jun 2014 17:20:16 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=918">ggentile</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1064</guid>
			<description><![CDATA[The rule 10.1 and 10.4 of MISRA 2004 is vital for porting C code from 32 to 16 bit micro.<br />
Why AC set this role to reccomended and not mandatory ?<br />
<br />
GG]]></description>
			<content:encoded><![CDATA[The rule 10.1 and 10.4 of MISRA 2004 is vital for porting C code from 32 to 16 bit micro.<br />
Why AC set this role to reccomended and not mandatory ?<br />
<br />
GG]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Status of MISRA AC documents March 2014]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1037</link>
			<pubDate>Tue, 11 Mar 2014 12:04:46 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=4">david ward</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1037</guid>
			<description><![CDATA[The MISRA Autocode (AC) suite of documents will be undergoing a refresh in the near future to bring them up to date and align them with the new MISRA branding and other MISRA documents. MISRA AC GMG and MISRA AC SLSF will be reviewed and updated.<br />
<br />
Based on the experience of MISRA AC contributors in using the current documents, the number and organization of documents is also up for consideration.  In particular, it is believed that the code generation specific layer of guideline documents, where MISRA AC TL sits and where a MISRA AC EC offering could sit, is better supported by tool vendors themselves; the frequency of updates to auto-code generation tools has proved too high for a user-based body such as MISRA to keep track of, and it is in the interest of the tool vendors to provide guidelines directly to support their customers in meeting their respective industry software development standards.<br />
<br />
MISRA AC TL is now seven years old and far removed from the current version of the tool offered by its vendor.  This document will be deprecated and no longer supported by MISRA from 1 June 2014.<br />
<br />
MISRA AC AGC will remain available and supported for legacy users of MISRA C:2004.  It should be noted that the current version MISRA C:2012 integrates requirement for automatically-generated C code.]]></description>
			<content:encoded><![CDATA[The MISRA Autocode (AC) suite of documents will be undergoing a refresh in the near future to bring them up to date and align them with the new MISRA branding and other MISRA documents. MISRA AC GMG and MISRA AC SLSF will be reviewed and updated.<br />
<br />
Based on the experience of MISRA AC contributors in using the current documents, the number and organization of documents is also up for consideration.  In particular, it is believed that the code generation specific layer of guideline documents, where MISRA AC TL sits and where a MISRA AC EC offering could sit, is better supported by tool vendors themselves; the frequency of updates to auto-code generation tools has proved too high for a user-based body such as MISRA to keep track of, and it is in the interest of the tool vendors to provide guidelines directly to support their customers in meeting their respective industry software development standards.<br />
<br />
MISRA AC TL is now seven years old and far removed from the current version of the tool offered by its vendor.  This document will be deprecated and no longer supported by MISRA from 1 June 2014.<br />
<br />
MISRA AC AGC will remain available and supported for legacy users of MISRA C:2004.  It should be noted that the current version MISRA C:2012 integrates requirement for automatically-generated C code.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Application of rule 14.10 for Autogenerated code]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=934</link>
			<pubDate>Mon, 14 Jan 2013 13:49:40 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=2398">ssauvage</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=934</guid>
			<description><![CDATA[I have recently received a question from a customer using our code generation tools (embedded coder).<br />
The code that we generate for a block (saturate block) is like this:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>rtB_out = something;<br />
if(rtB_out &gt; maxlim) {<br />
&nbsp;&nbsp; rtB_out = maxlim;<br />
}<br />
else {<br />
&nbsp;&nbsp; if(rtB_out &lt; minlim) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rtB_out = minlim;<br />
&nbsp;&nbsp; }<br />
}</code></div></div><br />
The customer asked whether the code above was MISRA compliant, in particular with respect to rule 14.10.<br />
It is an â€œ<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>if ... else { if { ... } }</code></div></div>â€ construct and very close to the  â€œ<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>if ... else if ...</code></div></div>â€ construct as described in the rule 14.10.<br />
However, it can be read as a simple if being the statement in an else clause.<br />
<br />
Personally, I find the code quite readable as it is and it is easy to check that there is no path where rtB_out is not assigned a value.<br />
Would you recommend to have a final else in this context?]]></description>
			<content:encoded><![CDATA[I have recently received a question from a customer using our code generation tools (embedded coder).<br />
The code that we generate for a block (saturate block) is like this:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>rtB_out = something;<br />
if(rtB_out &gt; maxlim) {<br />
&nbsp;&nbsp; rtB_out = maxlim;<br />
}<br />
else {<br />
&nbsp;&nbsp; if(rtB_out &lt; minlim) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rtB_out = minlim;<br />
&nbsp;&nbsp; }<br />
}</code></div></div><br />
The customer asked whether the code above was MISRA compliant, in particular with respect to rule 14.10.<br />
It is an â€œ<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>if ... else { if { ... } }</code></div></div>â€ construct and very close to the  â€œ<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>if ... else if ...</code></div></div>â€ construct as described in the rule 14.10.<br />
However, it can be read as a simple if being the statement in an else clause.<br />
<br />
Personally, I find the code quite readable as it is and it is easy to check that there is no path where rtB_out is not assigned a value.<br />
Would you recommend to have a final else in this context?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[does MISRA C rule 15.0 apply to MISRA AC AGC?]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=893</link>
			<pubDate>Fri, 27 Apr 2012 10:04:19 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=837">ggoulas</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=893</guid>
			<description><![CDATA[Hello,<br />
The rule 15.0 that has been added in MISRA-C edition 2 as a required rule is not present in the MISRA AC AGC document.<br />
Should it be ignored in the context of Auto Code?<br />
If not, is it an OBL rule? a REC rule?<br />
Regards,<br />
G.Goulas.]]></description>
			<content:encoded><![CDATA[Hello,<br />
The rule 15.0 that has been added in MISRA-C edition 2 as a required rule is not present in the MISRA AC AGC document.<br />
Should it be ignored in the context of Auto Code?<br />
If not, is it an OBL rule? a REC rule?<br />
Regards,<br />
G.Goulas.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Inlcude rule 19.11]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=837</link>
			<pubDate>Mon, 01 Aug 2011 16:55:46 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=918">ggentile</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=837</guid>
			<description><![CDATA[Rule 19.11<br />
Double include protection. This rule is still OBL also for AC. May you provide some more detail on the rationale behind the necessity for this rules ?<br />
<br />
best regards<br />
Giacomo]]></description>
			<content:encoded><![CDATA[Rule 19.11<br />
Double include protection. This rule is still OBL also for AC. May you provide some more detail on the rationale behind the necessity for this rules ?<br />
<br />
best regards<br />
Giacomo]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Welcome]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=429</link>
			<pubDate>Thu, 06 Dec 2007 11:24:27 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=9">Steve Montgomery</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=429</guid>
			<description><![CDATA[This new forum has been set up for asking questions about and discussing MISRA's \"Guidelines for the application of MISRA-C:2004 in the context of automatic code generation\" (otherwise known as MISRA AC AGC). <br />
<br />
The Working Group responsible for the MISRA AC AGC document will consider questions posted here and if appropriate give an official response (which will be posted by the \"MISRA Reply\" user). Any other comments and responses from any posters shall not be considered an official MISRA position. <br />
<br />
We expect to respond to questions on an approximately monthly basis so if you don't hear from us, please be patient. <br />
<br />
Steve Montgomery <br />
MISRA Autocode Guidelines Project Leader]]></description>
			<content:encoded><![CDATA[This new forum has been set up for asking questions about and discussing MISRA's \"Guidelines for the application of MISRA-C:2004 in the context of automatic code generation\" (otherwise known as MISRA AC AGC). <br />
<br />
The Working Group responsible for the MISRA AC AGC document will consider questions posted here and if appropriate give an official response (which will be posted by the \"MISRA Reply\" user). Any other comments and responses from any posters shall not be considered an official MISRA position. <br />
<br />
We expect to respond to questions on an approximately monthly basis so if you don't hear from us, please be patient. <br />
<br />
Steve Montgomery <br />
MISRA Autocode Guidelines Project Leader]]></content:encoded>
		</item>
	</channel>
</rss>