This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

patch for Bug testsuite/22461


Apparently my fingers live in a different universe than my brain.

In committing my 4.0-pending patches, I forgot the patch below.

Applied to 4.0 branch.

Joseph, this fixes the regression.

	* typeck.c (build_binary_op): Adjust error message to something
	more meaningful.

Index: typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/typeck.c,v
retrieving revision 1.616.2.11
diff -c -p -r1.616.2.11 typeck.c
*** typeck.c	11 Jul 2005 14:24:06 -0000	1.616.2.11
--- typeck.c	13 Jul 2005 20:25:29 -0000
*************** build_binary_op (enum tree_code code, tr
*** 3186,3193 ****
        /* Vector arithmetic is only allowed when both sides are vectors.  */
        if (code0 == VECTOR_TYPE && code1 == VECTOR_TYPE)
  	{
! 	  if (!tree_int_cst_equal (TYPE_SIZE (type0), TYPE_SIZE (type1)))
! 	    error ("can't convert between vector values of different size");
  	  arithmetic_types_p = 1;
  	}
      }
--- 3186,3198 ----
        /* Vector arithmetic is only allowed when both sides are vectors.  */
        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;
! 	    }
  	  arithmetic_types_p = 1;
  	}
      }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]