<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Information, warning or error message when a #pragma is missing? in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Information-warning-or-error-message-when-a-pragma-is-missing/m-p/262007#M9969</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CW should produce C4200 warning by default:&lt;/P&gt;&lt;H1 id="toc-hId-1846695370"&gt;&lt;A class="anchor" name="pageC4200" target="_blank"&gt;C4200: Other segment than in previous declaration&lt;/A&gt;&lt;/H1&gt;&lt;P&gt;[DISABLE, INFORMATION, &lt;STRONG&gt;WARNING&lt;/STRONG&gt;, ERROR] &lt;/P&gt;&lt;H2 id="toc-hId--901975096"&gt;&lt;A class="anchor" name="description" target="_blank"&gt;Description&lt;/A&gt;&lt;/H2&gt;&lt;P&gt;A object (variable or function) was declared with inconsistent segments. &lt;/P&gt;&lt;H2 id="toc-hId-840835239"&gt;&lt;A class="anchor" name="example" target="_blank"&gt;Example&lt;/A&gt;&lt;/H2&gt;&lt;PRE class="jive-pre"&gt;&lt;SPAN class="preprocessor"&gt;#pragma DATA_SEG A&lt;/SPAN&gt; &lt;SPAN class="preprocessor"&gt;&lt;/SPAN&gt;&lt;SPAN class="keyword"&gt;extern&lt;/SPAN&gt; &lt;SPAN class="keywordtype"&gt;int&lt;/SPAN&gt; i; &lt;SPAN class="preprocessor"&gt;#pragma DATA_SEG B&lt;/SPAN&gt; &lt;SPAN class="preprocessor"&gt;int i;&lt;/SPAN&gt; &lt;/PRE&gt;&lt;H2 id="toc-hId--1711321722"&gt;&lt;A class="anchor" name="tips" target="_blank"&gt;Tips&lt;/A&gt;&lt;/H2&gt;&lt;P&gt;Change the segment pragmas in a way that all declarations and the definition of one object are in the same segment. Otherwise wrong optimizations could happen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Oct 2013 16:05:23 GMT</pubDate>
    <dc:creator>ZhangJennie</dc:creator>
    <dc:date>2013-10-03T16:05:23Z</dc:date>
    <item>
      <title>Information, warning or error message when a #pragma is missing?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Information-warning-or-error-message-when-a-pragma-is-missing/m-p/262006#M9968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;Hello everyone!&amp;nbsp;&amp;nbsp; I am using CW V4.6 for HCS12(X)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;If I want to move something (const or variable) to GLOBAL memory, I have to put pragmas covering the declaration AND the definition.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;If I miss one of this pragmas, I mean, if I put pragmas in the declaration and not in the definition or vice versa, is there any INFORMATION, WARNING or ERROR message that could warn me that that element is not being properly allocated?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;hipercadi&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 08:38:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Information-warning-or-error-message-when-a-pragma-is-missing/m-p/262006#M9968</guid>
      <dc:creator>_hiper_</dc:creator>
      <dc:date>2013-10-03T08:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Information, warning or error message when a #pragma is missing?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Information-warning-or-error-message-when-a-pragma-is-missing/m-p/262007#M9969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CW should produce C4200 warning by default:&lt;/P&gt;&lt;H1 id="toc-hId-1846695370"&gt;&lt;A class="anchor" name="pageC4200" target="_blank"&gt;C4200: Other segment than in previous declaration&lt;/A&gt;&lt;/H1&gt;&lt;P&gt;[DISABLE, INFORMATION, &lt;STRONG&gt;WARNING&lt;/STRONG&gt;, ERROR] &lt;/P&gt;&lt;H2 id="toc-hId--901975096"&gt;&lt;A class="anchor" name="description" target="_blank"&gt;Description&lt;/A&gt;&lt;/H2&gt;&lt;P&gt;A object (variable or function) was declared with inconsistent segments. &lt;/P&gt;&lt;H2 id="toc-hId-840835239"&gt;&lt;A class="anchor" name="example" target="_blank"&gt;Example&lt;/A&gt;&lt;/H2&gt;&lt;PRE class="jive-pre"&gt;&lt;SPAN class="preprocessor"&gt;#pragma DATA_SEG A&lt;/SPAN&gt; &lt;SPAN class="preprocessor"&gt;&lt;/SPAN&gt;&lt;SPAN class="keyword"&gt;extern&lt;/SPAN&gt; &lt;SPAN class="keywordtype"&gt;int&lt;/SPAN&gt; i; &lt;SPAN class="preprocessor"&gt;#pragma DATA_SEG B&lt;/SPAN&gt; &lt;SPAN class="preprocessor"&gt;int i;&lt;/SPAN&gt; &lt;/PRE&gt;&lt;H2 id="toc-hId--1711321722"&gt;&lt;A class="anchor" name="tips" target="_blank"&gt;Tips&lt;/A&gt;&lt;/H2&gt;&lt;P&gt;Change the segment pragmas in a way that all declarations and the definition of one object are in the same segment. Otherwise wrong optimizations could happen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 16:05:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Information-warning-or-error-message-when-a-pragma-is-missing/m-p/262007#M9969</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2013-10-03T16:05:23Z</dc:date>
    </item>
  </channel>
</rss>

