<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code size variation between C51 Compiler Versions</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/21067/code-size-variation-between-c51-compiler-versions</link><description> 
I have some code that compiles under C51 compiler V7.05 and uses
0E5AH of code space. The same code compiles under C51 compiler V8.06
and uses 107AH of code space. Why the increase in code space? 

 
I am using the eval. version and working on Silabs</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Code size variation between C51 Compiler Versions</title><link>https://community.arm.com/thread/47640?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2007 15:18:31 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ef099c5f-1107-461e-981f-ca160a80335b</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Remember no: no HLL compiler ever gives you any guarantees about
the precise machine instructions that will be generated - it should
be pretty much assumed that different compiler versions
&lt;i&gt;&lt;b&gt;will&lt;/b&gt;&lt;/i&gt; give different results.&lt;/p&gt;

&lt;p&gt;
This is the fundamental reason why timing loops are a no-no in &amp;#39;C&amp;#39;
(or any other HLL).&lt;/p&gt;

&lt;p&gt;
However, having said that, one would generally hope that the code
size generated by a new compiler version would be no worse than its
predecessor!&lt;/p&gt;

&lt;p&gt;
As Erik says, have you checked that &lt;i&gt;&lt;b&gt;all&lt;/b&gt;&lt;/i&gt; the settings
are equivalent - defaults may certainly change between versions!&lt;/p&gt;

&lt;p&gt;
Maybe some Libraries have changed?&lt;/p&gt;

&lt;p&gt;
You&amp;#39;d need to inspect the LST and MAP files to see exactly where
the extra is coming from.&lt;/p&gt;

&lt;p&gt;
You might just be unlucky - maybe something has changed that
&lt;i&gt;generally&lt;/i&gt; gives tighter code, but yours is the
exception...?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code size variation between C51 Compiler Versions</title><link>https://community.arm.com/thread/88145?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2007 07:24:31 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c052404d-a2b8-411f-86d6-f5531b6e87f5</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
beware of defaults.&lt;/p&gt;

&lt;p&gt;
I once got caught in a &amp;quot;works with this version, lots of errors
with another&amp;quot; and neither Keil support nor this forum caught the fact
that my problem was due to a change of defaults between two versions
untill I reposted the third time in 6 months.&lt;/p&gt;

&lt;p&gt;
Try running both versions &lt;b&gt;with everything specified&lt;/b&gt; nothing
defaulted (optimixation, model, ....)&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code size variation between C51 Compiler Versions</title><link>https://community.arm.com/thread/50440?ContentTypeID=1</link><pubDate>Sun, 21 Jan 2007 18:52:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9d0c1fcd-07d1-41a6-a690-40db3f7424f2</guid><dc:creator>Philip Garman</dc:creator><description>&lt;p&gt;&lt;p&gt;
What is your optimization setting for both projects? Have &amp;quot;Favor
size&amp;quot; selected in either?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>