From: Théodore Papadopoulo Date: Thu, 8 Dec 2005 09:09:08 +0000 (+0000) Subject: call.c (build_conditional_expr): Print types in error messages. X-Git-Tag: releases/gcc-4.2.0~5506 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f55ae1721303d9392dc062355ac22741e06bfca0;p=thirdparty%2Fgcc.git call.c (build_conditional_expr): Print types in error messages. 2005-12-08 Théodore Papadopoulo * call.c (build_conditional_expr): Print types in error messages. From-SVN: r108222 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 86b0c719ace7..633e4d8ca0e3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2005-12-08 Théodore Papadopoulo + + * call.c (build_conditional_expr): Print types in error messages. + 2005-12-07 Volker Reichelt * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 99b8bcbee155..53040d5e13bb 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; }