https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88698
--- Comment #2 from Devin Hussey <husseydevin at gmail dot com> --- What I am saying is that I think -flax-vector-conversions should be default, or we should only have minimal warnings instead of errors. That will make generic vectors much easier to use. It is to be noted that Clang has -Wvector-conversion, which is the equivalent of -fno-lax-vector-conversions, however, it is a warning that only occurs with -Weverything. Not even -Wall -Wextra -Wpedantic in C++ mode will enable it. If Clang thinks this is such a minor issue that it won't even warn with -Wall -Wextra -Wpedantic, why does GCC consider it an error? However, if you want examples, here: Example 1 (SSE2) Here, we are trying to use an intrinsic which accepts and returns an __m128i (defined as "long long __attribute__((vector_size(16)))") with a u32x4 (defined as "uint32_t __attribute__((vector_size(16)))") #include <emmintrin.h> #include <stdint.h> typedef uint32_t u32x4 __attribute__((vector_size(16))); u32x4 shift(u32x4 val) { return _mm_srli_epi32(val, 15); } On Clang, it will happily accept that, only complaining on -Wvector-conversion. GCC will fail to compile. There are three ways around that: 1. Typedef u32x4 to __m128i. This is unreasonable, because that causes the operator overloads and constructors to operate on 64-bit integers instead of 32-bit. 2. Add -flax-vector-conversions. Requiring someone to add a warning suppression flag to compile your code is often seen as code smell. 3. Cast. Good lord, if you thought intrinsics were ugly, this will change your mind: return (u32x4)_mm_srli_epi32((__m128i)val, 15); or C++-style: return static_cast<u32x4>(_mm_srli_epi32(static_cast<__m128i>(val), 15)); Example 2 (ARMv7-a + NEON): #include <arm_neon.h> _Static_assert(sizeof(unsigned long) == sizeof(unsigned int), "use 32-bit please"); typedef unsigned long u32x4 __attribute__((vector_size(16))); u32x4 shift(u32x4 val) { return vshrq_n_u32(val, 15); } This is the second issue: unsigned long and unsigned int are the same size and should have no issues converting between each other. This often comes from a situation where uint32_t is set to unsigned long. Example 3 (Generic): typedef unsigned u32x4 __attribute__((vector_size(16))); typedef unsigned long long u64x2 __attribute__((vector_size(16))); u64x2 cast(u32x4 val) { return val; } This should emit a warning without a cast. I would recommend an error, but Clang without -Wvector-conversion accepts this without any complaining. Example 4 (Generic): typedef unsigned u32x2 __attribute__((vector_size(8))); typedef unsigned long long u64x2 __attribute__((vector_size(16))); u64x2 cast(u32x2 val) { return val; } This is clearly an error. There should be __builtin_convertvector which is being tracked in a different bug, but that is not the point.