Useless pointer-to-int-cast warning?
Jonathan Wakely
jwakely.gcc@gmail.com
Fri Aug 17 23:15:00 GMT 2018
On Fri, 17 Aug 2018 at 23:27, Vincent Lefevre wrote:
>
> What's the point of the pointer-to-int-cast warning, which is
> enabled by -Wall?
>
> I get this warning under 32-bit Linux when casting a pointer to
> uintmax_t. I use uintmax_t to make sure that the integer size is
> large enough. So, what's the problem?
sizeof(uintmax_t) != sizeof(void*).
Why not use uintptr_t instead?
More information about the Gcc-help
mailing list