Compile warnings 64 bit Visual Studio

I’m using: SWI-Prolog version 8.2.3 - 8.3.0

When compiling using the foreign interface file SWI-cpp.h in Visual Studio/64-bit and using e.g.:

__inline PlTerm
PlTerm::operator [](ARITY_T index) const

… I get a compile warning because ARITY_T is now a size_t which in VS/64-bit is 64 bit, so it complains about an assignment possibly losing data when assigning 64 bit to e.g. long which is still only 32 bit - without a cast.

I tried redefining ARITY_T=int which failed also, and defining PL_ARITY_AS_SIZE=0 didn’t work either… also, it seems like a short sighted plan. Is there any way I can get rid of this warning?

1 Like