On Wed, Sep 19, 2012 at 1:39 AM, Christer Solskogen <christer.solskogen@xxxxxxxxx> wrote: > > Heh. But this will at least fix compiling a native gcc for mingw-w64: This is OK with a ChangeLog entry. Don't commit the change to gcc/REVISION. Thanks. Ian > --- /home/solskogen/source/gcc-trunk/gcc/cp/class.c 2012-09-19 > 07:08:34.541126434 +0200 > +++ gcc/gcc/cp/class.c 2012-09-19 10:02:24.768291368 +0200 > > @@ -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); > + (unsigned long) (uintptr_t) 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)); > + (unsigned long)(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)", (unsigned > long)(uintptr_t)binfo); > > fprintf (stream, " in %s", type_as_string (t, > TFF_PLAIN_IDENTIFIER)); > } > fprintf (stream, "\n"); > diff -Naur --exclude .svn /home/solskogen/source/gcc-trunk/gcc/ggc-common.c > gcc/gcc/ggc-common.c > --- /home/solskogen/source/gcc-trunk/gcc/ggc-common.c 2012-09-19 > 07:08:52.486136671 +0200 > +++ gcc/gcc/ggc-common.c 2012-09-19 09:52:40.176368518 +0200 > > @@ -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. */ > > diff -Naur --exclude .svn /home/solskogen/source/gcc-trunk/gcc/pointer-set.c > gcc/gcc/pointer-set.c > --- /home/solskogen/source/gcc-trunk/gcc/pointer-set.c 2012-09-19 > 07:06:07.140135274 +0200 > +++ gcc/gcc/pointer-set.c 2012-09-19 09:54:32.308293421 +0200 > > @@ -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. */ > diff -Naur --exclude .svn /home/solskogen/source/gcc-trunk/gcc/print-tree.c > gcc/gcc/print-tree.c > --- /home/solskogen/source/gcc-trunk/gcc/print-tree.c 2012-09-19 > 07:08:52.528134157 +0200 > +++ gcc/gcc/print-tree.c 2012-09-19 09:56:55.383303722 +0200 > > @@ -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) > diff -Naur --exclude .svn /home/solskogen/source/gcc-trunk/gcc/REVISION > gcc/gcc/REVISION > --- /home/solskogen/source/gcc-trunk/gcc/REVISION 2012-09-19 > 08:08:46.905214325 +0200 > +++ gcc/gcc/REVISION 1970-01-01 01:00:00.000000000 +0100 > @@ -1 +0,0 @@ > -[trunk revision 191461] > diff -Naur --exclude .svn /home/solskogen/source/gcc-trunk/gcc/tree-dump.c > gcc/gcc/tree-dump.c > --- /home/solskogen/source/gcc-trunk/gcc/tree-dump.c 2012-09-19 > 07:06:06.857256504 +0200 > +++ gcc/gcc/tree-dump.c 2012-09-19 09:58:22.256214114 +0200 > > @@ -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; > } > >