检测intel编译器

hig*_*guy 4 c macros intel c-preprocessor

我想在Linux上使用intels current编译器.我有一个内联宏,它应该检测编译器.它曾经使用过去版本的gcc和icc.但是现在我得到extern inline了icc.icc现在定义GNUC吗?你怎么会发现icc?

#ifndef INLINE
# if defined(__GNUC__) || defined(__GNUG__)
#  define INLINE extern inline
# else
#  define INLINE inline
# endif
#endif
Run Code Online (Sandbox Code Playgroud)

Mah*_*dsi 8

__INTEL_COMPILER是你在找什么.(来源:ICC手册页)