From b8f75b8cde8c632738e447f5493aea7b30be8e32 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Fri, 22 May 2015 22:59:27 +0200 Subject: convert.c (convert_to_integer, [...]): Include the types in the error message. 2015-05-22 Marc Glisse gcc/ * convert.c (convert_to_integer, convert_to_vector): Include the types in the error message. gcc/testsuite/ * gcc.dg/simd-1.c: Update to the new message. From-SVN: r223590 --- gcc/convert.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc/convert.c') diff --git a/gcc/convert.c b/gcc/convert.c index 142e82a..0aa58ab 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -920,7 +920,9 @@ convert_to_integer (tree type, tree expr) case VECTOR_TYPE: if (!tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (expr)))) { - error ("can%'t convert between vector values of different size"); + error ("can%'t convert a vector of type %qT" + " to type %qT which has different size", + TREE_TYPE (expr), type); return error_mark_node; } return build1 (VIEW_CONVERT_EXPR, type, expr); @@ -1004,7 +1006,9 @@ convert_to_vector (tree type, tree expr) case VECTOR_TYPE: if (!tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (expr)))) { - error ("can%'t convert between vector values of different size"); + error ("can%'t convert a value of type %qT" + " to vector type %qT which has different size", + TREE_TYPE (expr), type); return error_mark_node; } return build1 (VIEW_CONVERT_EXPR, type, expr); -- cgit v1.1