Patchwork [c++] : 1 of 7 Fix for PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32

login
register
mail settings
Submitter Kai Tietz
Date Nov. 29, 2012, 1:15 p.m.
Message ID <CAEwic4bMMqd2JDgwHO82VssxGAJGCfcGFFzC+97iqHmJrtuAaA@mail.gmail.com>
Download mbox | patch
Permalink /patch/202740/
State New
Headers show

Comments

Kai Tietz - Nov. 29, 2012, 1:15 p.m.
Ok, here is the tested adjusted version using (u)intptr_t and hwi.  Ok
for apply?

Kai

       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");
Jason Merrill - Nov. 29, 2012, 3:21 p.m.
OK.

Jason

Patch

Index: cp/class.c
===================================================================
--- cp/class.c  (Revision 193925)
+++ cp/class.c  (Arbeitskopie)
@@ -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))
     {