On 12/14/19 4:35 PM, Bruno Haible wrote:
> the advice can be simplified: If pointer arithmetic
> is involved, uintptr_t is better suited than intptr_t. And if pointer 
> arithmetic
> is not involved, uintptr_t and intptr_t are equivalent and equally good.

It's more complicated in Emacs, because Emacs sometimes converts small integers
to pointers and then back again, and these integers can be negative. (The C
standard doesn't guarantee that this works, but Emacs is deliberately
nonportable in this low-level area and it does work on Emacs's current
platforms.) For such conversions, signed integers are more convenient.

It is a messy area, admittedly.

Reply via email to