Community
cancel
Showing results for 
Search instead for 
Did you mean: 
retspeej
Beginner
113 Views

does Intel compiler set a preprocessor symbol LINUXI (on linux) to identify itself?

I came across some code like this
#if (LINUXA || LINUXI || LINUXP)
which tested if it was Absoft, Intel or Portland linux compilers (as opposed to something unsupported).
I can't see these symbols defined anywhere in this particular package.
I recall a very old Microsoft compiler that had a predefined preprocessor symbol MSDOS so you could test if the code was being used on the appropriate platform.
Do Intel compilers generate some preprocessor symbol like LINUXI?
0 Kudos
3 Replies
TimP
Black Belt
113 Views

When you run ICL you get the pre-processor symbols for VC plus the __INTEL_COMPILER symbols (same as for the linux version) which you can read about in the ICL documentation.
SergeyKostrov
Valued Contributor II
113 Views

>>...Do Intel compilers generate some preprocessor symbol like LINUXI?..

What that macro I'm not sure. Where did you find it?

Every C/C++ compiler has some set of PredefinedANSI-Compliant macroslike __FILE__, __LINE__, __DATE__, etc., andPredefinedCompiler-Specific macros.All these macros are generated by a compiler.
Om_S_Intel
Employee
113 Views

As Tim said, the__INTEL_COMPILER macro is defined in "Intel C++ compiler and User guide". You may download a copy of it from http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/cpp/lin/main_cls_lin.pd....

Reply