On Tue, Sep 18, 2012 at 8:07 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote: >> Today when trying to build trunk, I encountered this error. But has >> not yet figured out how to fix it... > > I just committed a patch that should fix that problem. > > If there are other problems building libbacktrace, let me know. > You wanna take this as well? :-) Index: gcc/tree-dump.c =================================================================== --- gcc/tree-dump.c (revision 191450) +++ gcc/tree-dump.c (working copy) @@ -168,7 +168,7 @@ dump_pointer (dump_info_p di, const char *field, void *ptr) { dump_maybe_newline (di); - fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr); + fprintf (di->stream, "%-4s: %-8lx ", field, (uintptr_t) ptr); di->column += 15; } Index: gcc/pointer-set.c =================================================================== --- gcc/pointer-set.c (revision 191450) +++ gcc/pointer-set.c (working copy) @@ -64,7 +64,7 @@ #endif const unsigned long shift = HOST_BITS_PER_LONG - logmax; - return ((A * (unsigned long) p) >> shift) & (max - 1); + return ((A * (uintptr_t) p) >> shift) & (max - 1); } /* Allocate an empty pointer set. */ Index: gcc/cp/class.c =================================================================== --- gcc/cp/class.c (revision 191450) +++ gcc/cp/class.c (working copy) @@ -7576,7 +7576,7 @@ indented = maybe_indent_hierarchy (stream, indent, 0); fprintf (stream, "%s (0x%lx) ", type_as_string (BINFO_TYPE (binfo), TFF_PLAIN_IDENTIFIER), - (unsigned long) binfo); + (uintptr_t long) binfo); if (binfo != igo) { fprintf (stream, "alternative-path\n"); @@ -7601,7 +7601,7 @@ fprintf (stream, " primary-for %s (0x%lx)", type_as_string (BINFO_TYPE (BINFO_INHERITANCE_CHAIN (binfo)), TFF_PLAIN_IDENTIFIER), - (unsigned long)BINFO_INHERITANCE_CHAIN (binfo)); + (uintptr_t)BINFO_INHERITANCE_CHAIN (binfo)); } if (BINFO_LOST_PRIMARY_P (binfo)) { @@ -7734,7 +7734,7 @@ if (ctor_vtbl_p) { if (!BINFO_VIRTUAL_P (binfo)) - fprintf (stream, " (0x%lx instance)", (unsigned long)binfo); + fprintf (stream, " (0x%lx instance)", (uintptr_t)binfo); fprintf (stream, " in %s", type_as_string (t, TFF_PLAIN_IDENTIFIER)); } fprintf (stream, "\n"); Index: gcc/ggc-common.c =================================================================== --- gcc/ggc-common.c (revision 191450) +++ gcc/ggc-common.c (working copy) @@ -308,7 +308,7 @@ enum gt_types_enum type; }; -#define POINTER_HASH(x) (hashval_t)((long)x >> 3) +#define POINTER_HASH(x) (hashval_t)((uintptr_t)x >> 3) /* Register an object in the hash table. */ Index: gcc/print-tree.c =================================================================== --- gcc/print-tree.c (revision 191450) +++ gcc/print-tree.c (working copy) @@ -255,7 +255,7 @@ /* Allow this function to be called if the table is not there. */ if (table) { - hash = ((unsigned long) node) % HASH_SIZE; + hash = ((uintptr_t) node) % HASH_SIZE; /* If node is in the table, just mention its address. */ for (b = table[hash]; b; b = b->next) Index: gcc/prefix.c =================================================================== --- gcc/prefix.c (revision 191450) +++ gcc/prefix.c (working copy) @@ -157,12 +157,12 @@ } size = 32; - dst = xmalloc (size); + dst = (char *) xmalloc (size); res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size); if (res == ERROR_MORE_DATA && type == REG_SZ) { - dst = xrealloc (dst, size); + dst = (char *) xrealloc (dst, size); res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size); } -- chs,