我想在Linux上使用Intel当前的编译器。我有一个应该检测编译器的内联宏。它曾经与gcc和icc的早期版本一起使用。但是现在我得到icc的extern inline
。 icc现在是否定义GNUC?您将如何检测icc?
#ifndef INLINE
# if defined(__GNUC__) || defined(__GNUG__)
# define INLINE extern inline
# else
# define INLINE inline
# endif
#endif
__INTEL_COMPILER
是您要寻找的。 (来源:ICC man page)