white space requirement between macro name and replacement text

Submit New Article

Last Modified On :   November 17, 2008 9:19 AM PST
Rate
 


In the definition of an object-like macro, C99 and C++0x require that the replacement text be separated from the macro name by white space.  The front end of the Intel C++ Compiler previously failed to enforce this requirement in 9.X, 10.X versions of the compiler. With the latest 11.x version or with Intel® Parallel Composer, the compiler will now issue a warning.

For example:

#define x3.9    /* "x3" is the macro name, ".9" is the replacement text */

icpc -c t1.cpp

t1.cpp(1): warning #2217: white space is required between the macro name "x3" and its replacement text  #define x3.9

                                                                                                                                                                      ^

   

 





This article applies to: Intel® C++ Compiler for Linux* Knowledge Base,   Intel® C++ Compiler for Mac OS X* Knowledge Base,   Intel® C++ Compiler for Windows* Knowledge Base,   Intel® Parallel Composer Knowledge Base