This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: I miss a gcc warning


Andrew Haley writes:

 > Any use of uintptr_t should ring an alarm bell.  That's the real cause
 > of the bug, not anything else.  There are some real uses for
 > uintptr_t, but they are fairly obscure.

I should have added:

The right use for uintptr_t is as a temporary value: cast your pointer
to uintptr_t, do whatever it is you have to do, and then cast it back
to a pointer.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]