the following code is being compiled properly with gcc but giving error with icc in windows.
typedef int _v4si __attribute__ ((vector_size(16)));
Error : expected a ';' before __attribute__
Options : /Z7 /c /O3 /QxSSSE3_ATOM /Qfreestanding -DCPUKIND_IA -DLMT_CORE0
I am new to this compiler. Can anyone help ?
attributes in general and in particular GNU vector attributes are a GNU extension and thus they are not supported on Windows where we are Microsoft compatible.
The Microsoft/Windows equivalents are the built-in SIMD types on Windows – i.e. those defined in the *mmintin.h header files (e.g. __m128).
For more info see:
I think the v4si type with GNU is roughly equivalent to the __m128i type on Windows. The Windows types are not predefined, you need to include the appropriate mmintrin.h header to get the declarations.