Before the patch:
typedef unsigned int v4si attribute((ext_vector_type(4)));
void foo(v4si *ptr) { *ptr += 1.0f; }
would generate:
error: can't convert between vector values of different size ('v4si' (vector of 4 'unsigned int' values) and 'float')
void foo(v4si *ptr) { *ptr += 1.0f; }
~~~~ ^ ~~~~
This is a bit misleading, since the problem is a type mismatch between
the type of the scalar and the type of the vector elements, not a problem
with vectors of different size. (E.g. the code is correct with "1.0f"
replaced by the like-sized "1".) The patch changes the error to the more
generic:
error: invalid operands to binary expression ('v4si' (vector of 4 'unsigned int' values) and 'float')
void foo(v4si *ptr) { *ptr += 1.0f; }
~~~~ ^ ~~~~
Original patch by Richard Sandiford.