On Sun, 2004-11-07 at 05:30, Wolfram Quester wrote:
Hi,
I just received this bug report about (not) building inkscape in Debian's BTS.
With best regards,
Wolfi
[snip]
In file included from selection.h:25, from arc-context.cpp:30: gc-finalized.h: In static member function `static Inkscape::GC::Finalized* Inkscape::GC::Finalized::_unoffset(void*, void*)': gc-finalized.h:66: error: reinterpret_cast from `void*' to `int' loses precision
[snip]
Casting a void * to an int is probably a very bad thing to do. A void * is 64 bit on those arches while an int is 32 bit.
In this particular case the loss of precision is OK in practice, since the void * is being used to hold very small integers.
However, ptrdiff_t is still more appropriate and will always have sufficient precision to match void *; I will change the cast to that instead.
Thanks,
-mental