This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: convenience routines for hashtab.c


The routine in hashtab.c

/* Returns a hash code for P.  */

static hashval_t
hash_pointer (p)
     const void *p;
{
  return (hashval_t) p;
}

on the alpha converts a 64-bit pointer to a 32-bit int, and so generates
the warning:

../../../libiberty/hashtab.c: In function `hash_pointer':
../../../libiberty/hashtab.c:107: warning: cast from pointer to integer of different size

Was it intended to throw away the top 32 bits of the pointer?  If so,
can we silence this warning somehow?  (Often, this warning indicates
real problems on the alpha, so I'd like to get rid of any bogus warnings
if possible.)

Brad Lucier

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]