This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: c-decl.c broken on 64-bit platforms
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: gcc at gcc dot gnu dot org, Geoffrey Keating <geoffk at apple dot com>
- Date: 14 Jul 2003 22:00:03 -0300
- Subject: Re: c-decl.c broken on 64-bit platforms
- Organization: GCC Team, Red Hat
- References: <u84r1rgb57.fsf@gromit.moeb> <u8brvy6uxz.fsf@gromit.moeb>
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.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer