<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated on Wed, 25 Nov 2009 02:28:29 -0800 -->
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <atom:link href="http://software.intel.com/en-us/articles/intel-c-compiler-for-windows-kb/type/errors-diagnostics/feed/" rel="self" type="application/rss+xml" />
    <title>Intel Software Network articles feed</title>
    <link>http://software.intel.com/en-us/articles/intel-c-compiler-for-windows-kb/errors-diagnostics/</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>Diagnostic 269: invalid format string conversion</title>
      <description><![CDATA[ <br />
<div id="art_pre_template"><b>Casue: </b><br /><br />This warning is triggered by a printf or scanf format specifier that is not appropriate for the type of the variable being printed.<br /><br /><b>Example: </b><br /><br />
<p>#include &lt;stdio.h&gt;</p>
<p>int main() {<br />   long int li = 0;<br />   printf("%l\n",li);     // %l is the size specifier; the type specifer is missing<br />   printf("%ld\n",li);  // OK<br />   return 0;<br />}</p>
<p><br />&gt; icl -c /W4 diag269.cpp<br />Intel(R) C++ Compiler Professional for applications running on IA-32, Version 11.1    Build 20090511 Package ID: w_cproc_p_11.1.035<br />Copyright (C) 1985-2009 Intel Corporation.  All rights reserved.</p>
<p>diag269.cpp<br />diag269.cpp(5): warning #269: invalid format string conversion<br />     printf("%l\n",li);<br />                   ^</p>
<br /><b>Resolution : </b><br /><br />Use proper type specifier.<br /></div> ]]></description>
      <link>http://software.intel.com/en-us/articles/cdiag269</link>
      <pubDate>Wed, 18 Nov 2009 16:36:31 -0800</pubDate>
      <comments>http://software.intel.com/en-us/articles/cdiag269#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cdiag269</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
    </item>
    <item>
      <title>Diagnostic 181: argument is incompatible with corresponding format string conversion</title>
      <description><![CDATA[ <br />
<div id="art_pre_template"><b>Cause: </b><br /><br />This warning is triggered by a printf or scanf format specifier that is not appropriate for the type of the variable being printed. <br /><br /><b>Example: </b><br /><br />
<p>#include &lt;stdio.h&gt;</p>
<p>int main() {<br />   unsigned int ui = 0;<br />   printf("%f\n",ui);  // %f is for a double type, not an unsigned integer type<br />   printf("%u\n",ui); // OK<br />   return 0;<br />}<br />&gt; icl -c /W4 diag181.cpp<br />Intel(R) C++ Compiler Professional for applications running on IA-32, Version 11.1    Build 20090511 Package ID: w_cproc_p_11.1.035<br />Copyright (C) 1985-2009 Intel Corporation.  All rights reserved.</p>
<p>diag181.cpp<br />diag181.cpp(5): warning #181: argument is incompatible with corresponding format string conversion<br />     printf("%f\n",ui);<br />                   ^</p>
<b>Resolution : </b><br /><br />Use the proper type specifier.<br /></div> ]]></description>
      <link>http://software.intel.com/en-us/articles/cdiag181</link>
      <pubDate>Wed, 18 Nov 2009 16:23:47 -0800</pubDate>
      <comments>http://software.intel.com/en-us/articles/cdiag181#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cdiag181</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
    </item>
    <item>
      <title>Diagnostic 319: name followed by &amp;#34;::&amp;#34; must be a class or namespace</title>
      <description><![CDATA[ <br />
<div id="art_pre_template"><b>Cause: </b><br /><br />This diagnostic occurs when a qualifier is not preceded by a class or namespace name.  <br /><br /><b>Example: </b><br /><br />
<p>class C {<br />   static int i;<br />};</p>
<p>typedef int Foo;</p>
<p>int Foo::i;  // error -- Foo is not a class or namespace</p>
<br />
<p>&gt; icl -c diag319.cpp<br />Intel(R) C++ Compiler Professional for applications running on IA-32, Version 11.1    Build 20090511 Package ID: w_cproc_p_11.1.035<br />Copyright (C) 1985-2009 Intel Corporation.  All rights reserved.</p>
<p>diag319.cpp<br />diag319.cpp(7): error: name followed by "::" must be a class or namespace name<br />  int Foo::i;<br />      ^</p>
<br /><b>Resolution: </b><br /><br />Quality the name correctly.  For example:<br /><br />int C::i;    // ok, C is a class name<br /></div> ]]></description>
      <link>http://software.intel.com/en-us/articles/cdiag319</link>
      <pubDate>Wed, 18 Nov 2009 15:24:43 -0800</pubDate>
      <comments>http://software.intel.com/en-us/articles/cdiag319#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cdiag319</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
    </item>
    <item>
      <title>Diagnostic 109: expression must have (pointer-to-) function type</title>
      <description><![CDATA[ <br />
<div id="art_pre_template"><b>Cause: </b><br />
<p><br />This error is reported when the compiler sees a function call but the identifier in the<br />function call is not a function name or function pointer.</p>
<p><br /><b>Example: <br /></b><br />void foo(void* p) {<br />    p();   // p is being called as if it were a function but it is not a function<br /><br />}</p>
<p>&gt; icl -c diag109.cpp<br />Intel(R) C++ Compiler Professional for applications running on IA-32, Version 11.1    Build 20090511 Package ID: w_cproc_p_11.1.035<br />Copyright (C) 1985-2009 Intel Corporation.  All rights reserved.</p>
<p>diag109.cpp<br />diag109.cpp(2): error: expression must have (pointer-to-) function type<br />      p();<br />      ^</p>
<p><b>Resolution : </b><br />Ensure there is no syntax error and the function prototype exists.</p>
</div> ]]></description>
      <link>http://software.intel.com/en-us/articles/cdiag109</link>
      <pubDate>Wed, 18 Nov 2009 15:13:47 -0800</pubDate>
      <comments>http://software.intel.com/en-us/articles/cdiag109#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cdiag109</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
    </item>
    <item>
      <title>Diagnostic 1881: argument must be a constant null pointer value</title>
      <description><![CDATA[ <p><strong>Cause:</strong></p>
<p>The sentinel attribute is described in the GNU* documentation here: <a href="http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/Function-Attributes.html#Function-Attributes">http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/Function-Attributes.html#Function-Attributes</a> </p>
<p>It says:</p>
<p>A valid NULL in this context is defined as zero with any pointer type. If your system defines the NULL macro with an integer type then you need to add an explicit cast.</p>
<p>The GNU compiler will give a diagnostic too also if "-Wformat" is specified.</p>
<p><strong>Example:</strong></p>
<pre name="code" class="cpp">#define NULL 0

//#define NULL ((void*)0)  // this fixes the problem

int execl(const char *path, const char *arg, ...) __attribute__ ((sentinel));

int main() {
   execl("","",NULL); // warning issued here
   return 0;
}
</pre>
<p> </p>
<blockquote>
<p>$ icc -c diag1881.c<br />diag1881.c(9): warning #1881: argument must be a constant null pointer value<br />     execl("","",NULL); // warning issued here<br />                 ^</p>
</blockquote>
<p><br /><strong>Resolution status:<br /></strong>Use a header file that defines NULL as a pointer type (such as stddef.h) or declare NULL correctly like:</p>
<pre name="code" class="cpp">#define NULL ((void*)0)  // this fixes the problem</pre> ]]></description>
      <link>http://software.intel.com/en-us/articles/cdiag1881</link>
      <pubDate>Mon, 16 Nov 2009 16:44:26 -0800</pubDate>
      <comments>http://software.intel.com/en-us/articles/cdiag1881#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cdiag1881</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
    </item>
    <item>
      <title>Compiler issues the message &amp;#34;Catastrophic error: unable to obtain mapped memory (see pch_diag.txt) &amp;#34;</title>
      <description><![CDATA[ <div id="article_text">
<div id="art_pre_template"><b>Reference Number :</b> DPD200141164<br /><br /><br /><b>Version : </b>11.1<br /><br /><br /><b>Product : </b>Intel® C++ Compilers Professional Edition for Windows*.  Intel ® Parallel Composer.<br /><br /><br /><b>Operating System :</b> All x64 versions of Windows* <br /><br /><br /><b>Problem Description : </b>When building a Visual Studio 2005 or 2008* generated MFC Application or a MFC ActiveX Control, the compiler reports the following message:<br /><br />Catastrophic error: unable to obtain mapped memory (see pch_diag.txt)<br /><br />This means that there was an internal problem with the precompiled header processing in the compiler.  This problem has been seen only in the 64-bit versions of Windows* and only with the x64 project configurations.<br /><br /><br /><b>Resolution Status :</b> This issue has been resolved and the solution will be provided in a future compiler update.  As a temporary workaround please use the compiler option "/Q_multisrc-" .  The "/Q_multisrc-" option may add to the overall compilation time.<br /><br /><br /><br /><i>[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]</i></div>
</div>
<br /> ]]></description>
      <link>http://software.intel.com/en-us/articles/compiler-issues-the-message-catastrophic-error-unable-to-obtain-mapped-memory-see-pch_diagtxt</link>
      <pubDate>Thu, 22 Oct 2009 17:00:28 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/compiler-issues-the-message-catastrophic-error-unable-to-obtain-mapped-memory-see-pch_diagtxt#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/compiler-issues-the-message-catastrophic-error-unable-to-obtain-mapped-memory-see-pch_diagtxt</guid>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
    </item>
    <item>
      <title>Warning #677: memory usage conflict with precompiled header file seen on Windows* XP and Linux*</title>
      <description><![CDATA[ <br />
<div id="art_pre_template"><strong>Reference Number :</strong> DPD200136749<br /><br /><br /><strong>Version : </strong>10.1, 11.0, 11.1<br /><br /><br /><strong>Product : </strong>Intel® C++ Compilers Professional Edition for Windows* and Linux*.  Intel ® Parallel Composer.<br /><br /><br /><strong>Operating System :</strong> Windows* versions prior to Windows Vista* or equivalent, Linux*<br /><br /><br /><strong>Problem Description : </strong>When using precompiled headers, you may see the diagnostic:<br /><br />Warning #677: memory usage conflict with precompiled header file<br /><br />This means that there was an internal problem with the precompiled header processing in the compiler and precompiled headers will not be used for the file in question which may cause an increase in build times.<br /><br /><br /><strong>Resolution Status :</strong> We are investigating this issue.  Please contact us via the User Forum or Intel® Premier Support if you are experiencing this issue.<br /><br /><br /><br /><i>[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]</i></div> ]]></description>
      <link>http://software.intel.com/en-us/articles/warning-677-memory-usage-conflict-with-precompiled-header-file-seen-on-windows-xp-and-linux</link>
      <pubDate>Thu, 22 Oct 2009 15:35:39 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/warning-677-memory-usage-conflict-with-precompiled-header-file-seen-on-windows-xp-and-linux#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/warning-677-memory-usage-conflict-with-precompiled-header-file-seen-on-windows-xp-and-linux</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
    </item>
    <item>
      <title>Diagnostic 10120: overriding &amp;lt;option&gt; with &amp;lt;option&gt;</title>
      <description><![CDATA[ <p> </p>
<p><strong>Cause</strong>:</p>
<p>This warning is issued by the driver when you have two conflicting options on the same command line. The last one on the command line "wins".Remember that command line options can exist in makefiles and config files (i.e. icc.cfg, icpc.cfg, icl.cfg or ifort.cfg).</p>
<p><strong>Example:</strong></p>
<blockquote>
<p>&gt; icc -O3 -O2 -c foo.c<br />icc: command line warning #10120: overriding '-O3' with '-O2'</p>
</blockquote>
<p><strong>Resolution Status</strong>:</p>
<p>Look at your command line and remove the redundant flag.</p> ]]></description>
      <link>http://software.intel.com/en-us/articles/cdiag10120</link>
      <pubDate>Fri, 02 Oct 2009 14:54:04 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/cdiag10120#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cdiag10120</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
    </item>
    <item>
      <title>Diagnostic 10114: Microsoft Visual C++ not found in path</title>
      <description><![CDATA[ <p><br /><strong>Cause:</strong></p>
<p>The Intel(R) C++ compiler for Windows needs to know which version of the Microsoft* compiler (i.e. Microsoft Visual C++ 2003*, 2005*, 2008* etc) you are using in order to set our Microsoft compability version to emulate. <br /><br />For example, there are certain Microsoft bugs that exist in the Microsoft Visual C++ 2003 compiler but were fixed in Microsoft Visual C++ 2005 that we would only emulate if you had a Microsoft Visual C++ 2003 environment (header files and libraries). <br /><br />In order to do this, the icl driver looks in your path for the version of cl.exe and sets the microsoft version when it calls our compiler based upon what it finds.</p>
<p><strong>Example:</strong></p>
<p>Compiling any program on Windows and not having "cl.exe" somewhere in your path.</p>
<p><strong>Resolution status:</strong></p>
<p>Change your path environment variables to include the directories where Microsoft Visual C++ executable "cl.exe", include header files and run time libraries. Easiest way is to run Visual C++ vcvars32.bat. <br /><br />Or pass the options "/Qvc[7.1|8|9]" and "/Qlocation,link,"[cl-dir]" to the icl.exe.</p> ]]></description>
      <link>http://software.intel.com/en-us/articles/cdiag10114</link>
      <pubDate>Mon, 28 Sep 2009 11:28:53 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/cdiag10114#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cdiag10114</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
    </item>
    <item>
      <title>Diagnostic 2215: definition at end of file not followed by a semicolon or a declarator</title>
      <description><![CDATA[ <br />
<p><strong>Cause:</strong></p>
<p>A header or source file does not have a terminator at the end of the file. This usually is followed by a syntax error in the file that includes the header file but can occur by itself if the terminator appears in the next file.</p>
<p><strong>Example:</strong></p>
<pre name="code" class="cpp">// diag2215.h

class C {
} // Warn on the suspect end-of-file condition here.

// diag2215.cpp
#include "diag2215.h"

Ctype;  // semicolon (terminator) is actually in the source file

int main() {
   return 0;
}
</pre>
<p> </p>
<blockquote>
<p>$ icpc -c diag2215.cpp<br />diag2215.h(4): warning #2215: definition at end of file not followed by a semicolon or a declarator<br />  } // no semicolon in this file<br />  ^</p>
</blockquote>
<p><strong>Resolution state:</strong></p>
<p>Either move the terminator to the file with the last token of the type definition or suppress the warning with -wd2215 (Linux*) or -Qwd2215 (Windows*).</p> ]]></description>
      <link>http://software.intel.com/en-us/articles/cdiag2215</link>
      <pubDate>Mon, 28 Sep 2009 11:12:27 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/cdiag2215#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cdiag2215</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
    </item>
  </channel></rss>