Closed GoogleCodeExporter closed 9 years ago
In my opinion you should never cast a pointer to a long or int or anything
other than another pointer type. This has been the reason why so many programs
don't work when moving from 32 to 64 bit for instance in the past. When you do
a cast from char* to long you are relying on an assumption which may not hold
true between architectures. Windows 64 uses the LLP64/IL32P64 data model which
is why the compiler complains because a long is still 32 bit while a pointer is
64 bit.
For the most part the forum posts are right, but I try to avoid this practice
in general because it could come back a bite you later.
Original comment by akei...@gmail.com
on 6 Dec 2013 at 12:14
Some further testing of this change I made has shown at least on Linux with
GCC, stdint.h has to be included to be able to use the "intptr_t" datatype.
Original comment by makoener...@gmail.com
on 8 Dec 2013 at 5:02
moved to https://github.com/bulletphysics/bullet3/issues/70
Original comment by erwin.coumans
on 30 Mar 2014 at 5:22
Original issue reported on code.google.com by
makoener...@gmail.com
on 5 Dec 2013 at 7:34Attachments: