This is the mail archive of the
mailing list for the GCC project.
Re: broken arithmetic operations on vectors (c and c++)
Richard Henderson wrote:
On Tue, Jun 14, 2005 at 03:01:30PM -0400, Aldy Hernandez wrote:
+ if (code0 == VECTOR_TYPE && code1 == VECTOR_TYPE)
+ if (!tree_int_cst_equal (TYPE_SIZE (type0), TYPE_SIZE (type1))
+ || !same_scalar_type_ignoring_signedness (TREE_TYPE (type0),
+ TREE_TYPE (type1)))
+ binary_op_error (code);
+ return error_mark_node;
It looks like this should do down below the switch with the other
special cases. But otherwise ok.
And, there's no need for the inner "if"; just combine that into the
condition for the outer "if". I, too, see no problems with the revised