I want to use Intel's current compiler on Linux. I have an inline macro which is supposed to detect the compiler.
It used to work with past versions of GCC and ICC. But now I get extern inline
with ICC. Does ICC now define __GNUC__
? How would you detect ICC or Intel's C++ compiler, ICPC?
#ifndef INLINE
# if defined(__GNUC__) || defined(__GNUG__)
# define INLINE extern inline
# else
# define INLINE inline
# endif
#endif
You can invoke the command-line compiler by typing the name of its executable file into the command line, also known as the MS-DOS prompt. If you compile from the default Windows Command Prompt, you must type the fully qualified path to the executable file.
ICC (Linux), ICL (Windows) are classic Intel C/C++ Compilers. Whereas, ICX is Intel nextgen compiler based on Clang /LLVM technology plus Intel proprietary optimizations and code generation. You may use ICC for performance on CPU targets. ICX enables OpenMP TARGET offload to Intel GPU targets.
__INTEL_COMPILER
is what you are looking for. (Source: ICC man page)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With