From owner-freebsd-current Wed May 10 14:53:41 2000 Delivered-To: freebsd-current@freebsd.org Received: from gidora.zeta.org.au (gidora.zeta.org.au [203.26.10.25]) by hub.freebsd.org (Postfix) with SMTP id 4DB8237B966 for ; Wed, 10 May 2000 14:53:35 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: (qmail 7680 invoked from network); 10 May 2000 21:53:31 -0000 Received: from bde.zeta.org.au (203.2.228.102) by gidora.zeta.org.au with SMTP; 10 May 2000 21:53:31 -0000 Date: Thu, 11 May 2000 07:53:27 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Doug Rabson Cc: Simon Shapiro , freebsd-current@FreeBSD.ORG, obrien@FreeBSD.ORG, Mike Smith Subject: Re: One more question (different now) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 10 May 2000, Doug Rabson wrote: > On Wed, 10 May 2000, Simon Shapiro wrote: > > It actually worked! Now I will go and see what this uintptr_t > > actually is :-) > > Its an unsigned integer type which is the same size as a pointer (i.e. its > safe to cast a pointer to uintptr_t without losing information). Actually, it is only guaranteed that casting a void * to uintptr_t doesn't lose information, and the size of uintptr_t may be anything that works. From the C99 draft (n869.txt): 7.18.1.4 Integer types capable of holding object pointers [#1] The following type designates a signed integer type with the property that any valid pointer to void can be converted to this type, then converted back to pointer to void, and the result will compare equal to the original pointer: intptr_t The following type designates an unsigned integer type with the property that any valid pointer to void can be converted to this type, then converted back to pointer to void, and the result will compare equal to the original pointer: uintptr_t These types are optional. | [C99 has standard macros which can be used in ifdefs to determine whether optional types exist. Optional types should exist if they can exist. FreeBSD doesn't support C99, but uintptr_t exists for all supported arches. The C00 macros to support it are not implemented.] Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message