Useless pointer-to-int-cast warning?
Vincent Lefevre
vincent+gcc@vinc17.org
Mon Aug 20 14:46:00 GMT 2018
On 2018-08-20 09:17:11 +0100, Jonathan Wakely wrote:
> It says even uintmax_t might not be sufficient. It also says that if
> intptr_t and uintptr_t are defined, then they can hold the value of
> any void*.
>
> So it seems like you're not actually solving the problem by using
> uintmax_t, just reducing it.
If uintmax_t doesn't work, the problem isn't really solvable.
> I still think it's best to use uintptr_t when available.
The issue is that it is not always available. And if it is, then
uintmax_t is guaranteed to be at least as large by definition,
so that uintmax_t will necessarily work.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the Gcc-help
mailing list