Closed
Description
While testing cxx with https://github.com/PX4/eigen/tree/3.4 :
/* The Intel API is flexible enough that we must allow aliasing with other
vector types, and their scalar components. */
typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
/* Create a vector of zeros. */
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setzero_ps (void)
{
return __extension__ (__m128){ 0.0f, 0.0f, 0.0f, 0.0f };
}
Output:
g++ -fsyntax-only test-m128.cpp
#no error
clang++ -fsyntax-only test-m128.cpp
test-m128.cpp:6:74: warning: unknown attribute '__artificial__' ignored [-Wunknown-attributes]
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
^
1 warning generated.
cxx -fsyntax-only -toolchain linux test-m128.cpp
test-m128.cpp:9:32: expected ';'
return __extension__ (__m128){ 0.0f, 0.0f, 0.0f, 0.0f };
^
test-m128.cpp:9:57: expected ';'
return __extension__ (__m128){ 0.0f, 0.0f, 0.0f, 0.0f };
^
Metadata
Metadata
Assignees
Labels
No labels