- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
#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?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>...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.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.pdf.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page