On Friday 20 June 2008 10:53:55 Andrew Johnson wrote: > I'm concluding that these warnings are due to incorrect casting inside of > packfile.c. > > In both cases, the code generating the warnings looks like this: > > munmap(PARROT_const_cast(opcode_t *, pf->src), pf->size); > > pf->src is a const opcode_t* and the purpose of the PARROT_const_cast is to > drop the const. The first argument to munmap() is a void* on Linux and Mac, > but a char* on Solaris; I tried globally defining the feature-test macros > _POSIX_C_SOURCE or _XPG4_2, but these are supposed to be an all-or-nothing > choice, and in both cases they broke the build elsewhere. > > In C any pointer auto-converts to a void*, but has to be cast to any other > pointer type such as a char*. If we change the above casts to void* the > warning on Solaris goes away. I have checked this on Linux and it builds > fine. Hence the attached patch to packfile.c
This sounds reasonable. I'd like to hear results from trying to compile with a C++ compiler though. NotFound, any luck? -- c