Re: Useless pointer-to-int-cast warning?

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

 



On Mon, 20 Aug 2018 at 10:51, Segher Boessenkool wrote:
> In the infrequent case where you do want to cast a pointer to an integer
> and back, you should use uintptr_t.  It's what it is there for!
>
> ("But it is optional!"  It is required by susv3, most systems have it).

And for unlikely systems which don't have it, there's no guarantee
that uintmax_t can represent all pointer values either. If uintmax_t
could hold all the values of a pointer, I'd expect the system to do:

typedef uintmax_t uintptr_t;



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux