pharo-project / pharo-vm

This is the VM used by Pharo
http://pharo.org
Other
113 stars 68 forks source link

Compiler warning: -Wno-pointer-integer-compare #790

Open PalumboN opened 5 months ago

PalumboN commented 5 months ago

These warnings are due comparison between pointers (most char *) and integers (most sqInt). For example:

generated/64/vm/src/gcc3x-cointerp.c:29031:31: 
warning: comparison between pointer and integer ('char *' and 'usqInt' (aka 'unsigned long')) [-Wpointer-integer-compare]
                if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) {

It is because all the pointers to the stack are declared as char *... check the comment on this line: https://github.com/pharo-project/pharo-vm/blob/5aa6b45578542b8e7425466e94859f2cc01ab031/smalltalksrc/VMMaker/StackInterpreter.class.st#L537-L540

The problem changing that line to #usqInt makes compilation errors.