Re: Question about building hash values from pointers

2008-06-02 Thread Kai Tietz
"Richard Guenther" <[EMAIL PROTECTED]> wrote on 02.06.2008 10:28:12: > On Mon, Jun 2, 2008 at 5:59 AM, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > > Andrew Haley <[EMAIL PROTECTED]> writes: > > > >> Ian Lance Taylor wrote: > >>> Andrew Haley <[EMAIL PROTECTED]> writes: > >>> > Richard Gue

Re: Question about building hash values from pointers

2008-06-02 Thread Richard Guenther
On Mon, Jun 2, 2008 at 5:59 AM, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > Andrew Haley <[EMAIL PROTECTED]> writes: > >> Ian Lance Taylor wrote: >>> Andrew Haley <[EMAIL PROTECTED]> writes: >>> Richard Guenther wrote: > On Fri, May 30, 2008 at 10:57 AM, Kai Tietz <[EMAIL PROTECTED]> wro

Re: Question about building hash values from pointers

2008-06-01 Thread Ian Lance Taylor
Andrew Haley <[EMAIL PROTECTED]> writes: > Ian Lance Taylor wrote: >> Andrew Haley <[EMAIL PROTECTED]> writes: >> >>> Richard Guenther wrote: On Fri, May 30, 2008 at 10:57 AM, Kai Tietz <[EMAIL PROTECTED]> wrote: > Hi, > > as I noticed, most hash value calculations are trying to

Re: Question about building hash values from pointers

2008-06-01 Thread Andrew Haley
Ian Lance Taylor wrote: > Andrew Haley <[EMAIL PROTECTED]> writes: > >> Richard Guenther wrote: >>> On Fri, May 30, 2008 at 10:57 AM, Kai Tietz <[EMAIL PROTECTED]> wrote: Hi, as I noticed, most hash value calculations are trying to use pointer values for building the value and

Re: Question about building hash values from pointers

2008-05-30 Thread Ian Lance Taylor
Andrew Haley <[EMAIL PROTECTED]> writes: > Richard Guenther wrote: >> On Fri, May 30, 2008 at 10:57 AM, Kai Tietz <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> as I noticed, most hash value calculations are trying to use pointer >>> values for building the value and assume that a long/unsigned long s

Re: Question about building hash values from pointers

2008-05-30 Thread Paolo Bonzini
it's uintptr_t which should be used, if only as an intermediate cast - (unsigned long)(uintptr_t)ptr. That's not possible because, IIRC, gcc must compile on C90 systems. Right, so the only type remaining is size_t. IIRC there is problem for this type on some targets, too. AFAIC there are 24-

Re: Question about building hash values from pointers

2008-05-30 Thread Kai Tietz
Andrew Haley <[EMAIL PROTECTED]> wrote on 30.05.2008 12:07:49: > Richard Guenther wrote: > > On Fri, May 30, 2008 at 10:57 AM, Kai Tietz <[EMAIL PROTECTED]> wrote: > >> Hi, > >> > >> as I noticed, most hash value calculations are trying to use pointer > >> values for building the value and assume

Re: Question about building hash values from pointers

2008-05-30 Thread Andrew Haley
Richard Guenther wrote: > On Fri, May 30, 2008 at 10:57 AM, Kai Tietz <[EMAIL PROTECTED]> wrote: >> Hi, >> >> as I noticed, most hash value calculations are trying to use pointer >> values for building the value and assume that a long/unsigned long scalar >> is wide enough for a pointer. This is at

Re: Question about building hash values from pointers

2008-05-30 Thread Andrew Haley
Kai Tietz wrote: > Andrew Haley <[EMAIL PROTECTED]> wrote on 30.05.2008 11:45:50: > >> Kai Tietz wrote: >> >>> as I noticed, most hash value calculations are trying to use pointer >>> values for building the value and assume that a long/unsigned long > scalar >>> is wide enough for a pointer.

Re: Question about building hash values from pointers

2008-05-30 Thread Richard Guenther
On Fri, May 30, 2008 at 10:57 AM, Kai Tietz <[EMAIL PROTECTED]> wrote: > Hi, > > as I noticed, most hash value calculations are trying to use pointer > values for building the value and assume that a long/unsigned long scalar > is wide enough for a pointer. This is at least for w64 target not true.

Re: Question about building hash values from pointers

2008-05-30 Thread Kai Tietz
Andrew, Andrew Haley <[EMAIL PROTECTED]> wrote on 30.05.2008 11:45:50: > Kai Tietz wrote: > > > as I noticed, most hash value calculations are trying to use pointer > > values for building the value and assume that a long/unsigned long scalar > > is wide enough for a pointer. This is at least

Re: Question about building hash values from pointers

2008-05-30 Thread Andrew Haley
Kai Tietz wrote: > as I noticed, most hash value calculations are trying to use pointer > values for building the value and assume that a long/unsigned long scalar > is wide enough for a pointer. This is at least for w64 target not true. So > I want to know, if it would be good to introduce an

Question about building hash values from pointers

2008-05-30 Thread Kai Tietz
Hi, as I noticed, most hash value calculations are trying to use pointer values for building the value and assume that a long/unsigned long scalar is wide enough for a pointer. This is at least for w64 target not true. So I want to know, if it would be good to introduce an gcc specific type for