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 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


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