Patchwork [middle-end] : Fix pointer cast warning for LLP64 in emit-rtl.c

login
register
mail settings
Submitter Kai Tietz
Date Jan. 4, 2011, 12:31 p.m.
Message ID <AANLkTikNbSSDSrUsWqGsFVDOkK9G=FJs2sL5p93L5LqZ@mail.gmail.com>
Download mbox | patch
Permalink /patch/77458/
State New
Headers show

Comments

Kai Tietz - Jan. 4, 2011, 12:31 p.m.
Hello,

ChangeLog gcc/

2011-01-04  Kai Tietz

        * emit-rtl.c (reg_attrs_htab_hash): Replace long by intptr_t.

Tested for i686-pc-cygwin and x86_64-w64-mingw32. Ok for apply?

Regards,
Kai
NightStrike - Jan. 16, 2011, 2:11 p.m.
Ping

On Tue, Jan 4, 2011 at 7:31 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
> Hello,
>
> ChangeLog gcc/
>
> 2011-01-04  Kai Tietz
>
>        * emit-rtl.c (reg_attrs_htab_hash): Replace long by intptr_t.
>
> Tested for i686-pc-cygwin and x86_64-w64-mingw32. Ok for apply?
>
> Regards,
> Kai
>
> Index: emit-rtl.c
> ===================================================================
> --- emit-rtl.c  (revision 168457)
> +++ emit-rtl.c  (working copy)
> @@ -325,7 +325,7 @@
>  {
>   const reg_attrs *const p = (const reg_attrs *) x;
>
> -  return ((p->offset * 1000) ^ (long) p->decl);
> +  return (hashval_t) ((p->offset * 1000) ^ (intptr_t) p->decl);
>  }
>
>  /* Returns nonzero if the value represented by X (which is really a
>
Richard Henderson - Jan. 24, 2011, 5:13 p.m.
On 01/04/2011 04:31 AM, Kai Tietz wrote:
>         * emit-rtl.c (reg_attrs_htab_hash): Replace long by intptr_t.

Ok.


r~
Kai Tietz - Jan. 24, 2011, 6:51 p.m.
2011/1/24 Richard Henderson <rth@redhat.com>:
> On 01/04/2011 04:31 AM, Kai Tietz wrote:
>>         * emit-rtl.c (reg_attrs_htab_hash): Replace long by intptr_t.
>
> Ok.
>
>
> r~
>

Applied at revision 169176. Additionally fix ChangeLog date entry of
Paul Koning.

Regards,
Kai

Patch

Index: emit-rtl.c
===================================================================
--- emit-rtl.c  (revision 168457)
+++ emit-rtl.c  (working copy)
@@ -325,7 +325,7 @@ 
 {
   const reg_attrs *const p = (const reg_attrs *) x;

-  return ((p->offset * 1000) ^ (long) p->decl);
+  return (hashval_t) ((p->offset * 1000) ^ (intptr_t) p->decl);
 }

 /* Returns nonzero if the value represented by X (which is really a