bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: intptr_t vs. uintptr_t


From: Bruno Haible
Subject: Re: intptr_t vs. uintptr_t
Date: Sun, 15 Dec 2019 01:35:58 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-166-generic; KDE/5.18.0; x86_64; ; )

Hi Paul,

> I installed the attached into the Emacs Lisp reference manual to try to 
> capture
> that advice.

Thanks. This is better. But 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. So,
a simpler advice would be to always prefer uintptr_t (to represent pointer
values).

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]