re PR bootstrap/53912 (bootstrap fails using default c++ mode in stage 2 and 3 for...
authorKai Tietz <ktietz@redhat.com>
Thu, 29 Nov 2012 15:26:29 +0000 (16:26 +0100)
committerKai Tietz <ktietz@gcc.gnu.org>
Thu, 29 Nov 2012 15:26:29 +0000 (16:26 +0100)
PR target/53912
* class.c (dump_class_hierarchy_r): Cast from pointer via uintptr_t.
(dump_vtable): Likewise.

From-SVN: r193934

gcc/cp/ChangeLog
gcc/cp/class.c

index c202bdf..4f240e9 100644 (file)
@@ -1,3 +1,9 @@
+2012-11-29  Kai Tietz  <ktietz@redhat.com>
+
+       PR target/53912
+       * class.c (dump_class_hierarchy_r): Cast from pointer via uintptr_t.
+       (dump_vtable): Likewise.
+
 2012-11-29  Ed Smith-Rowland  <3dw4rd@verizon.net>
 
        PR c++/52654
index da511e2..82b2c0a 100644 (file)
@@ -7815,9 +7815,9 @@ dump_class_hierarchy_r (FILE *stream,
   int i;
 
   indented = maybe_indent_hierarchy (stream, indent, 0);
-  fprintf (stream, "%s (0x%lx) ",
+  fprintf (stream, "%s (0x" HOST_WIDE_INT_PRINT_HEX ") ",
           type_as_string (BINFO_TYPE (binfo), TFF_PLAIN_IDENTIFIER),
-          (unsigned long) binfo);
+          (HOST_WIDE_INT) (uintptr_t) binfo);
   if (binfo != igo)
     {
       fprintf (stream, "alternative-path\n");
@@ -7839,10 +7839,10 @@ dump_class_hierarchy_r (FILE *stream,
   if (BINFO_PRIMARY_P (binfo))
     {
       indented = maybe_indent_hierarchy (stream, indent + 3, indented);
-      fprintf (stream, " primary-for %s (0x%lx)",
+      fprintf (stream, " primary-for %s (0x" HOST_WIDE_INT_PRINT_HEX ")",
               type_as_string (BINFO_TYPE (BINFO_INHERITANCE_CHAIN (binfo)),
                               TFF_PLAIN_IDENTIFIER),
-              (unsigned long)BINFO_INHERITANCE_CHAIN (binfo));
+              (HOST_WIDE_INT) (uintptr_t) BINFO_INHERITANCE_CHAIN (binfo));
     }
   if (BINFO_LOST_PRIMARY_P (binfo))
     {
@@ -7975,7 +7975,8 @@ dump_vtable (tree t, tree binfo, tree vtable)
       if (ctor_vtbl_p)
        {
          if (!BINFO_VIRTUAL_P (binfo))
-           fprintf (stream, " (0x%lx instance)", (unsigned long)binfo);
+           fprintf (stream, " (0x" HOST_WIDE_INT_PRINT_HEX " instance)",
+                    (HOST_WIDE_INT) (uintptr_t) binfo);
          fprintf (stream, " in %s", type_as_string (t, TFF_PLAIN_IDENTIFIER));
        }
       fprintf (stream, "\n");