diff options
author | Daniel Berlin <dberlin@gcc.gnu.org> | 2007-05-31 20:58:29 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@gcc.gnu.org> | 2007-05-31 20:58:29 +0000 |
commit | 2c751309df4f3c1021f4a8714f57ea757feec63e (patch) | |
tree | a7eb204beebfc59d90675d0ed35447f9467c1b56 /gcc/c-common.c | |
parent | 6847c43d7348b8a1eb39ed9501666bb905b89948 (diff) | |
download | gcc-2c751309df4f3c1021f4a8714f57ea757feec63e.zip gcc-2c751309df4f3c1021f4a8714f57ea757feec63e.tar.gz gcc-2c751309df4f3c1021f4a8714f57ea757feec63e.tar.bz2 |
in gcc/ 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
in gcc/
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.
From-SVN: r125239
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 2edf807..2d893ff 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -2233,10 +2233,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; @@ -2287,7 +2287,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. |