This looks like a 32bit/64bit issue. 1. How widespread are problems with C99 in the codebase?
2. Are the fixes obvious, scriptable, and tested? If the answers are easily known then let’s talk effort for trunk. Sent from my iPhone > On Sep 22, 2022, at 10:08 PM, Peter Kovacs <pe...@apache.org> wrote: > > Hi all, > > We cast int to (void*) -> (example in main/sw/source/ui/fldui/changedb.cxx > line 234) > > In general this sounds like not a sane idea to me, see discussions [1] [2] > [3]. The solution that the c++ community found is the use of intptr_t, which > is defined in C99. > > In general I would like to get rid of these casts. However as a quick fix it > would make sense to use intptr_t as a first measure. > > Is there any reason that would block the move to C99? I guess C99 should be > supported by all the compilers we require . (c11 is currently not available > on all Plattforms we support.) > > > > [1] > https://stackoverflow.com/questions/26805461/why-do-i-get-cast-from-pointer-to-integer-of-different-size-error > > [2] > https://stackoverflow.com/questions/25381610/cast-int-to-pointer-why-cast-to-long-first-as-in-p-void-42 > > [3] > https://stackoverflow.com/questions/6326338/why-when-to-use-intptr-t-for-type-casting-in-c > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org > For additional commands, e-mail: dev-h...@openoffice.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org