From: Tim Jenkins <tim@rnaworld.princeton.edu>
To: axp-list@redhat.com
Subject: Making programs 64 bit clean
Date: Mon, 22 Jun 1998 11:36:05 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.3.96.980622112328.5028A-100000@rnaworld.princeton.edu> (raw)
I have several programs which cast pointers to ints, which I am hoping to
clean up. It appears that if I redefine the integer variables as longs
and then cast the pointers to longs, I am converting a 64 bit pointer to a
64 bit long, rather than a 64 bit pointer to a 32 bit int.
e.g.
Unacceptable:
int foo;
int *bar;
foo = (int) bar;
Acceptable?:
long foo;
int *bar;
foo = (long) bar;
Is this an acceptable solution to making programs 64 bit clean and is it
portable across 32 bit and 64 bit platforms?
thanks,
tim
next reply other threads:[~1998-06-22 15:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-22 15:36 Tim Jenkins [this message]
1998-06-22 18:09 ` Making programs 64 bit clean Paul Tomblin
1998-06-22 19:27 ` Christopher Curtis
-- strict thread matches above, loose matches on Subject: below --
1998-06-22 17:35 Greg Lindahl
1998-06-22 19:32 ` Michal Jaegermann
1998-06-22 20:47 ` Christopher Curtis
1998-06-22 21:49 ` Michal Jaegermann
1998-06-22 21:50 ` Paul Tomblin
1998-06-22 22:24 ` Jeff Sturm
1998-06-22 19:53 ` Richard Hadsell
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox