2005-12-08 Théodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Dec 2005 09:09:08 +0000 (09:09 +0000)
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Dec 2005 09:09:08 +0000 (09:09 +0000)
        * call.c (build_conditional_expr): Print types in error
          messages.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108222 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/call.c

index 86b0c71..633e4d8 100644 (file)
@@ -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.
index 99b8bcb..53040d5 100644 (file)
@@ -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;
     }