The documentation says ptrint alias should not be used, but nativeint just aliases to ptrint. It says it's there for Delphi compatibility, but if Delphi has some workaround to avoid this problem (i.e. it's really using unsigned) shouldn't FP or if Delphi has the same problem then shouldn't the documentation have the warning also under nativeint? Not a big deal, of course just wondering.
The documentation says this:
https://www.freepascal.org/docs-html/rtl/system/ptrint.html so its introduction was more or less a mistake
You should use ptrUint and family on pointer types , which is also compatible with some Delphi versions.
We also have UintPtr, an alias for the PtrUInt type for compatibility with newer Delphi versions.
Any warning is about using signed integers for pointers.
There should not be a warning for NativeInt, because that is a legal type on its own and not a pointer.
BTW: Older Delphi's really have no workaround: it simply means that you only have half the addressable space -32 bit 2GB - (the positive part up to max(ptrInt) instead of the full unsigned range- 32bit 4GB -.