diff options
author | Théodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> | 2005-12-08 09:09:08 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2005-12-08 09:09:08 +0000 |
commit | f55ae1721303d9392dc062355ac22741e06bfca0 (patch) | |
tree | 59aed58529b924de561c26b85090f94ac1982192 | |
parent | 9783dd389a02fdd570f04597e424e1482ff60760 (diff) | |
download | gcc-f55ae1721303d9392dc062355ac22741e06bfca0.zip gcc-f55ae1721303d9392dc062355ac22741e06bfca0.tar.gz gcc-f55ae1721303d9392dc062355ac22741e06bfca0.tar.bz2 |
call.c (build_conditional_expr): Print types in error messages.
2005-12-08 Théodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
* call.c (build_conditional_expr): Print types in error
messages.
From-SVN: r108222
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/call.c | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 86b0c71..633e4d8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2005-12-08 Théodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> + + * call.c (build_conditional_expr): Print types in error messages. + 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de> * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 99b8bcb..53040d5 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -3278,7 +3278,8 @@ build_conditional_expr (tree arg1, tree arg2, tree arg3) || (conv2 && conv2->kind == ck_ambig) || (conv3 && conv3->kind == ck_ambig)) { - error ("operands to ?: have different types"); + error ("operands to ?: have different types %qT and %qT", + arg2_type, arg3_type); result = error_mark_node; } else if (conv2 && (!conv2->bad_p || !conv3)) @@ -3488,7 +3489,8 @@ build_conditional_expr (tree arg1, tree arg2, tree arg3) if (!result_type) { - error ("operands to ?: have different types"); + error ("operands to ?: have different types %qT and %qT", + arg2_type, arg3_type); return error_mark_node; } |