2007-05-31 Daniel Berlin <dberlin@dberlin.org>
* c-typeck.c (build_indirect_ref): Include type in error message.
(build_binary_op): Pass types to binary_op_error.
* c-common.c (binary_op_error): Take two type arguments, print out
types with error.
* c-common.h (binary_op_error): Update prototype.
In gcc/cp
2007-05-31 Daniel Berlin <dberlin@dberlin.org>
* typeck.c (build_binary_op): Include types in error.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125239
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-05-31 Daniel Berlin <dberlin@dberlin.org>
+
+ * c-typeck.c (build_indirect_ref): Include type in error message.
+ (build_binary_op): Pass types to binary_op_error.
+ * c-common.c (binary_op_error): Take two type arguments, print out
+ types with error.
+ * c-common.h (binary_op_error): Update prototype.
+
2007-05-31 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c: Correct coments on -mno-sse4.
* gcc.c (main): Don't consider linker options when issuing the
warning about a linker input file not being used.
+>>>>>>> .r125234
2007-05-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tree-vrp.c (compare_names): Initialize sop.
}
\f
/* Print an error message for invalid operands to arith operation
- CODE. */
+ CODE with TYPE0 for operand 0, and TYPE1 for operand 1. */
void
-binary_op_error (enum tree_code code)
+binary_op_error (enum tree_code code, tree type0, tree type1)
{
const char *opname;
default:
gcc_unreachable ();
}
- error ("invalid operands to binary %s", opname);
+ error ("invalid operands to binary %s (have %qT and %qT)", opname,
+ type0, type1);
}
\f
/* Subroutine of build_binary_op, used for comparison operations.
extern tree c_alignof_expr (tree);
/* Print an error message for invalid operands to arith operation CODE.
NOP_EXPR is used as a special case (see truthvalue_conversion). */
-extern void binary_op_error (enum tree_code);
+extern void binary_op_error (enum tree_code, tree, tree);
extern tree fix_string_type (tree);
struct varray_head_tag;
extern void constant_expression_warning (tree);
}
}
else if (TREE_CODE (pointer) != ERROR_MARK)
- error ("invalid type argument of %qs", errorstring);
+ error ("invalid type argument of %qs (have %qT)", errorstring, type);
return error_mark_node;
}
|| !same_scalar_type_ignoring_signedness (TREE_TYPE (type0),
TREE_TYPE (type1))))
{
- binary_op_error (code);
+ binary_op_error (code, type0, type1);
return error_mark_node;
}
if (!result_type)
{
- binary_op_error (code);
+ binary_op_error (code, TREE_TYPE (op0), TREE_TYPE (op1));
return error_mark_node;
}
+2007-05-31 Daniel Berlin <dberlin@dberlin.org>
+
+ * typeck.c (build_binary_op): Include types in error.
+
2007-05-31 Jakub Jelinek <jakub@redhat.com>
PR c++/31806
|| !same_scalar_type_ignoring_signedness (TREE_TYPE (type0),
TREE_TYPE (type1)))
{
- binary_op_error (code);
+ binary_op_error (code, type0, type1);
return error_mark_node;
}
arithmetic_types_p = 1;