On 07-Jun-01 Peter Pentchev wrote:
> On Thu, Jun 07, 2001 at 07:07:22PM +0300, Peter Pentchev wrote:
>> Hi,
>>
>> Is free((void *) (size_t) ptr) the only way to free a const whatever *ptr
>> with WARNS=2? (or more specifically, with -Wcast-qual)
>
> Uhm. OK. So size_t may not be enough to hold a pointer. What is it then -
> caddr_t?
uintptr_t for data pointers. In theory I think code pointers may not fit in a
uintptr_t.
free((void *)(uintptr_t)ptr) should work.
Of course, this begs the question of why you are free'ing a const. :)
--
John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message