Hi Collin,

> However, I think that the correct way to write this would be to use
> 'uintptr_t' which would work with large page sizes on more niche
> architectures [1].

Yes, the way to get rid of the warning is to cast from pointer to
'uintptr_t', not 'unsigned long'.

> Can you check the attached patch before I push?

The stdint.h part is right. What is not right, is to do a conversion
from pointer to uintptr_t and then back from uintptr_t to pointer.
That is inefficient on the CHERI architecture, IIRC.
It's better to keep the addition on the 'char *' side.

Bruno




Reply via email to