* error.c (dump_type): Be more helpful about VECTOR_TYPE.
authorJason Merrill <jason@redhat.com>
Tue, 5 Feb 2002 01:46:01 +0000 (20:46 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 5 Feb 2002 01:46:01 +0000 (20:46 -0500)
From-SVN: r49505

gcc/cp/ChangeLog
gcc/cp/error.c

index f0cb0704b432d2520ee583ca12be36e1de934502..76af2baadf5c37afa38039d1e2e612215f468267 100644 (file)
@@ -1,3 +1,7 @@
+2002-02-05  Jason Merrill  <jason@redhat.com>
+
+       * error.c (dump_type): Be more helpful about VECTOR_TYPE.
+
 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
 
        * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
index 594d4e4d5842b4486a380a673a396217f04f0e63..d4b1ff859a2dc7fe9b7d112b729e93ad5231846f 100644 (file)
@@ -382,7 +382,14 @@ dump_type (t, flags)
 
     case VECTOR_TYPE:
       output_add_string (scratch_buffer, "vector ");
-      dump_type (TREE_TYPE (t), flags);
+      {
+       /* The subtype of a VECTOR_TYPE is something like intQI_type_node,
+          which has no name and is not very useful for diagnostics.  So
+          look up the equivalent C type and print its name.  */
+       tree elt = TREE_TYPE (t);
+       elt = type_for_mode (TYPE_MODE (elt), TREE_UNSIGNED (elt));
+       dump_type (elt, flags);
+      }
       break;
 
     case INTEGER_TYPE: