c-decl.c broken on 64-bit platforms
Geoffrey Keating
geoffk@apple.com
Tue Jul 15 02:44:00 GMT 2003
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>
More information about the Gcc
mailing list