Intel推出的C/C++编译器,功能很齐全,附带有很棒的调试器。我是将它嵌入在Visual Studio 2005.NET中进行使用的。由于是Intel的编译器,因此它自然含有非常丰富的编译优化选项,支持各种高级指令集以及SIMD等特性。同时,它也支持OPENMP。当然,这个微软的VC++编译器也支持。
不过最让我感到兴奋的还是Intel编译器几乎完整地支持C99标准,这个是VC9.0也没有支持的功能。另外还有一个选项更让人兴奋——Enable C++0x Support。我不想再多说什么了。
下面是对Intel C99标准语法支持的测试。如果大家要尝试的话请用C文件(.c)来保存一以下信息,再进行编译。如果用的是GCC的话就用gcc命令来编译。
#include
<
stdio.h
>
struct Test
... {
int a;
union
...{
int a;
struct
...{
int c, d;
}u;
}s;
} ;
#define TRACE(...) (void)printf(__VA_ARGS__)
int main( void )
... {
int s[100] = ...{ [0] = 1, [10] = 2, [30] = 3 };
const int arraySize = 10;
int ss[arraySize]; // Here, the array "ss" cannot be initialized.
int a = 100;
int* restrict p = &a; // restrict supported
int *q = p;
struct Test
... {
int a;
union
...{
int a;
struct
...{
int c, d;
}u;
}s;
} ;
#define TRACE(...) (void)printf(__VA_ARGS__)
int main( void )
... {
int s[100] = ...{ [0] = 1, [10] = 2, [30] = 3 };
const int arraySize = 10;
int ss[arraySize]; // Here, the array "ss" cannot be initialized.
int a = 100;
int* restrict p = &a; // restrict supported
int *q = p;
int *pm = (int[]){ 1, 2, 3, 4 }; // anonymous array
struct Test t = ...{ .a=10, .s.u.c = 100, .s.u.d = 300 };
_Bool b = 1;
_Complex float comp = 0.15f;
TRACE("The answer is: %d ", *q);
TRACE("The answer is: %d ", t.a + t.s.u.c - t.s.u.d);
TRACE("The data is:%d ", t.s.a);
for(a=0; a<100; a++)
if(s[a] != 0)
TRACE("s[%d] is %d ", a, s[a]);
return 0;
}
struct Test t = ...{ .a=10, .s.u.c = 100, .s.u.d = 300 };
_Bool b = 1;
_Complex float comp = 0.15f;
TRACE("The answer is: %d ", *q);
TRACE("The answer is: %d ", t.a + t.s.u.c - t.s.u.d);
TRACE("The data is:%d ", t.s.a);
for(a=0; a<100; a++)
if(s[a] != 0)
TRACE("s[%d] is %d ", a, s[a]);
return 0;
}