<?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 declaration error in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/declaration-error/m-p/741212#M508</link>
    <description>&lt;P&gt;Are you coding in C or C++? The C++ dialect of Cilk requires you to declare the loop control variable in the cilk_for statement. ie: &lt;/P&gt;&lt;PRE&gt; cilk_for ( int j = 0; j &amp;lt; (*Env).nz_SSP&lt;I&gt;; j+1 ) {

&lt;/I&gt;&lt;/PRE&gt;&lt;P&gt;This was done to emphasize that the scope of the loop control variable is limited to within the loop. It was only relaxed for C because we had no choice. &lt;/P&gt;&lt;P&gt;- Barry&lt;/P&gt;</description>
    <pubDate>Thu, 01 Mar 2012 20:21:06 GMT</pubDate>
    <dc:creator>Barry_T_Intel</dc:creator>
    <dc:date>2012-03-01T20:21:06Z</dc:date>
    <item>
      <title>declaration error</title>
      <link>https://community.intel.com/t5/Software-Archive/declaration-error/m-p/741211#M507</link>
      <description>&lt;BR /&gt;Igot the following error mesage when I compiled my code with icc.&lt;BR /&gt;&lt;BR /&gt;InitializeScenarioData.c (192) error: Cilk_for initilization must be a declaration&lt;BR /&gt;&lt;BR /&gt;cilk_for ( j = 0; j &amp;lt; (*Env).nz_SSP&lt;I&gt;; j+1 ) {&lt;BR /&gt; ^&lt;BR /&gt;&lt;BR /&gt;I declared j as an integer. I also am using i (also declared as an integer) it is initialized and declared. Why am I getting this error?&lt;BR /&gt;&lt;BR /&gt;Thanx in advance.&lt;BR /&gt;&lt;BR /&gt;Newport_j&lt;BR /&gt;&lt;/I&gt;</description>
      <pubDate>Thu, 01 Mar 2012 19:04:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/declaration-error/m-p/741211#M507</guid>
      <dc:creator>newport_j</dc:creator>
      <dc:date>2012-03-01T19:04:26Z</dc:date>
    </item>
    <item>
      <title>declaration error</title>
      <link>https://community.intel.com/t5/Software-Archive/declaration-error/m-p/741212#M508</link>
      <description>&lt;P&gt;Are you coding in C or C++? The C++ dialect of Cilk requires you to declare the loop control variable in the cilk_for statement. ie: &lt;/P&gt;&lt;PRE&gt; cilk_for ( int j = 0; j &amp;lt; (*Env).nz_SSP&lt;I&gt;; j+1 ) {

&lt;/I&gt;&lt;/PRE&gt;&lt;P&gt;This was done to emphasize that the scope of the loop control variable is limited to within the loop. It was only relaxed for C because we had no choice. &lt;/P&gt;&lt;P&gt;- Barry&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2012 20:21:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/declaration-error/m-p/741212#M508</guid>
      <dc:creator>Barry_T_Intel</dc:creator>
      <dc:date>2012-03-01T20:21:06Z</dc:date>
    </item>
    <item>
      <title>declaration error</title>
      <link>https://community.intel.com/t5/Software-Archive/declaration-error/m-p/741213#M509</link>
      <description>&lt;P&gt;&lt;BR /&gt;It seems that most if the time you do not have to declare a variable in the for statement in c, but sometimes it does require you to. I can think of no other reason that that for this error.&lt;BR /&gt;&lt;BR /&gt;Newport_j&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2012 13:31:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/declaration-error/m-p/741213#M509</guid>
      <dc:creator>newport_j</dc:creator>
      <dc:date>2012-03-02T13:31:30Z</dc:date>
    </item>
    <item>
      <title>declaration error</title>
      <link>https://community.intel.com/t5/Software-Archive/declaration-error/m-p/741214#M510</link>
      <description>In OpenMP, some of us prefer to use C99 rather than C89, so that we can define the loop counter in the for() initialization rather than requiring it to be designated as private. For consistency, I personally would prefer the local declaration, not that such reasoning carries any weight.</description>
      <pubDate>Mon, 05 Mar 2012 02:32:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/declaration-error/m-p/741214#M510</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2012-03-05T02:32:19Z</dc:date>
    </item>
    <item>
      <title>Declaration error</title>
      <link>https://community.intel.com/t5/Software-Archive/declaration-error/m-p/741215#M511</link>
      <description>&lt;DIV id="tiny_quote"&gt;&lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A jquery1331597247953="58" rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=489993" href="https://community.intel.com/en-us/profile/489993/" class="basic"&gt;newport_j&lt;/A&gt;&lt;/DIV&gt;&lt;DIV style="background-color: #e5e5e5; margin-left: 2px; margin-right: 2px; border: 1px inset; padding: 5px;"&gt;&lt;I&gt;...It seems that most of the time you do not have to declare a variable in the for statement in C...&lt;/I&gt;&lt;/DIV&gt;&lt;BR /&gt;That depends on a &lt;STRONG&gt;C/C++compiler&lt;/STRONG&gt; andsupported version of a&lt;STRONG&gt;C/C++&lt;/STRONG&gt; LanguageStandard.&lt;BR /&gt;&lt;BR /&gt;Please take a look at two genericcases:&lt;BR /&gt;&lt;BR /&gt;// &lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;Case 1&lt;/SPAN&gt;&lt;/STRONG&gt; - Variable '&lt;STRONG&gt;i&lt;/STRONG&gt;' isdeclared in each '&lt;STRONG&gt;for&lt;/STRONG&gt;'statement.For some legacy C/C++compilersitwill be a&lt;BR /&gt; compilation error.&lt;BR /&gt;&lt;BR /&gt; ...&lt;BR /&gt; int iArray[32];&lt;BR /&gt;&lt;BR /&gt; for( &lt;STRONG&gt;int i&lt;/STRONG&gt; = 0; i &amp;lt; 32; i++ )&lt;BR /&gt; iArray&lt;I&gt; = i;&lt;BR /&gt;&lt;BR /&gt; for( &lt;STRONG&gt;int i&lt;/STRONG&gt; = 0; i &amp;lt; 32; i++ )&lt;BR /&gt; iArray&lt;I&gt;++;&lt;BR /&gt; ...&lt;BR /&gt;&lt;BR /&gt;// &lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;Case 2&lt;/SPAN&gt;&lt;/STRONG&gt; - Variable '&lt;STRONG&gt;i&lt;/STRONG&gt;' is declared outside of both'&lt;STRONG&gt;for&lt;/STRONG&gt;' statements. In that case the code could be&lt;BR /&gt; successfully compiled with legacy and modern C/C++compilers.These are more&lt;BR /&gt; portablecodes.&lt;BR /&gt;&lt;BR /&gt; ...&lt;BR /&gt; &lt;STRONG&gt;int i&lt;/STRONG&gt;;&lt;BR /&gt; int iArray[32];&lt;BR /&gt;&lt;BR /&gt; for( i = 0; i &amp;lt; 32; i++ )&lt;BR /&gt; iArray&lt;I&gt; = i;&lt;BR /&gt;&lt;BR /&gt; for( i = 0; i &amp;lt; 32; i++ )&lt;BR /&gt; iArray&lt;I&gt;++;&lt;BR /&gt; ...&lt;BR /&gt;&lt;BR /&gt;Both cases implement the same logic.&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Mar 2012 00:28:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/declaration-error/m-p/741215#M511</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-03-13T00:28:52Z</dc:date>
    </item>
    <item>
      <title>Declaration error</title>
      <link>https://community.intel.com/t5/Software-Archive/declaration-error/m-p/741216#M512</link>
      <description>If you give me a complete program that reproduces the problem, we can look at whether this is a bug or a misunderstanding. At this point I don't have enough information to tell.&lt;BR /&gt;&lt;BR /&gt; - Barry</description>
      <pubDate>Tue, 13 Mar 2012 14:19:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/declaration-error/m-p/741216#M512</guid>
      <dc:creator>Barry_T_Intel</dc:creator>
      <dc:date>2012-03-13T14:19:05Z</dc:date>
    </item>
  </channel>
</rss>

