svn commit: r259022 - in head/contrib/gcc: . cp
Pedro F. Giffuni
pfg at FreeBSD.org
Fri Dec 6 02:20:00 UTC 2013
Author: pfg
Date: Fri Dec 6 02:19:58 2013
New Revision: 259022
URL: http://svnweb.freebsd.org/changeset/base/259022
Log:
gcc: Include types in error message for build_binary_op.
Mostly cosmetic change, again to reduce differences with Apple's gcc.
Obtained from: gcc 4.3 (rev. 125239; GPLv2)
MFC after: 3 weeks
Modified:
head/contrib/gcc/ChangeLog.gcc43
head/contrib/gcc/c-common.c
head/contrib/gcc/c-common.h
head/contrib/gcc/c-typeck.c
head/contrib/gcc/cp/ChangeLog.gcc43
head/contrib/gcc/cp/typeck.c
Modified: head/contrib/gcc/ChangeLog.gcc43
==============================================================================
--- head/contrib/gcc/ChangeLog.gcc43 Fri Dec 6 01:16:26 2013 (r259021)
+++ head/contrib/gcc/ChangeLog.gcc43 Fri Dec 6 02:19:58 2013 (r259022)
@@ -57,6 +57,14 @@
operand.
(store_expr): Handle BLKmode moves by calling emit_block_move.
+2007-05-31 Daniel Berlin <dberlin at dberlin.org> (r125239)
+
+ * 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-27 Eric Christopher <echristo at apple.com> (r125116)
* config/rs6000/rs6000.c (rs6000_emit_prologue): Update
Modified: head/contrib/gcc/c-common.c
==============================================================================
--- head/contrib/gcc/c-common.c Fri Dec 6 01:16:26 2013 (r259021)
+++ head/contrib/gcc/c-common.c Fri Dec 6 02:19:58 2013 (r259022)
@@ -2019,10 +2019,10 @@ min_precision (tree value, int unsignedp
}
/* 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;
@@ -2073,7 +2073,8 @@ binary_op_error (enum tree_code code)
default:
gcc_unreachable ();
}
- error ("invalid operands to binary %s", opname);
+ error ("invalid operands to binary %s (have %qT and %qT)", opname,
+ type0, type1);
}
/* Subroutine of build_binary_op, used for comparison operations.
Modified: head/contrib/gcc/c-common.h
==============================================================================
--- head/contrib/gcc/c-common.h Fri Dec 6 01:16:26 2013 (r259021)
+++ head/contrib/gcc/c-common.h Fri Dec 6 02:19:58 2013 (r259022)
@@ -654,7 +654,7 @@ extern tree c_sizeof_or_alignof_type (tr
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);
Modified: head/contrib/gcc/c-typeck.c
==============================================================================
--- head/contrib/gcc/c-typeck.c Fri Dec 6 01:16:26 2013 (r259021)
+++ head/contrib/gcc/c-typeck.c Fri Dec 6 02:19:58 2013 (r259022)
@@ -1923,7 +1923,7 @@ build_indirect_ref (tree ptr, const char
}
}
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;
}
@@ -8135,7 +8135,7 @@ build_binary_op (enum tree_code code, tr
|| !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;
}
@@ -8431,7 +8431,7 @@ build_binary_op (enum tree_code code, tr
if (!result_type)
{
- binary_op_error (code);
+ binary_op_error (code, TREE_TYPE (op0), TREE_TYPE (op1));
return error_mark_node;
}
Modified: head/contrib/gcc/cp/ChangeLog.gcc43
==============================================================================
--- head/contrib/gcc/cp/ChangeLog.gcc43 Fri Dec 6 01:16:26 2013 (r259021)
+++ head/contrib/gcc/cp/ChangeLog.gcc43 Fri Dec 6 02:19:58 2013 (r259022)
@@ -18,6 +18,10 @@
* decl2.c (determine_visibility): Remove duplicate code for
handling type info.
+2007-05-31 Daniel Berlin <dberlin at dberlin.org> (r125239)
+
+ * typeck.c (build_binary_op): Include types in error.
+
2007-05-05 Geoffrey Keating <geoffk at apple.com> (r124467)
PR 31775
Modified: head/contrib/gcc/cp/typeck.c
==============================================================================
--- head/contrib/gcc/cp/typeck.c Fri Dec 6 01:16:26 2013 (r259021)
+++ head/contrib/gcc/cp/typeck.c Fri Dec 6 02:19:58 2013 (r259022)
@@ -3476,7 +3476,7 @@ build_binary_op (enum tree_code code, tr
|| !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;
More information about the svn-src-all
mailing list