This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: c-decl.c broken on 64-bit platforms



On Monday, July 14, 2003, at 06:00 PM, Alexandre Oliva wrote:


On Jul 13, 2003, Andreas Jaeger <aj@suse.de> wrote:

/usr/src/aj/cvs/gcc/gcc/c-decl.c:6797: warning: cast from pointer to integer of different size

To fix this I propose the appended patch.

There's no guarantee that sizeof(long) == sizeof(void*). This holds for most, but not all ABIs. (intptr_t) would probably be best, but I suppose we'd be better off using the function in libiberty that hashes pointers if we really want to do it.

If you're going to call out to a function, using the hash in the identifier will be faster. It wasn't there when I wrote the patch, which is why I didn't use it.


--
Geoff Keating <geoffk@apple.com>


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