From owner-freebsd-current Wed May 10 10: 8:23 2000 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 90C4337B820; Wed, 10 May 2000 10:08:18 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id DAA06953; Thu, 11 May 2000 03:08:04 +1000 Date: Thu, 11 May 2000 03:08:02 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Doug Rabson Cc: Mike Smith , obrien@FreeBSD.ORG, freebsd-current@FreeBSD.ORG 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: > You can suppress the warning if you cast to uintptr_t first. Pretty ugly > though. For (almost) full uglyness and correctness, you have to cast to "volatile void *" first, then back via "void *": #define unvolstructfoop(sfp) \ ((struct foo *)(void *)(uintptr_t)(volatile void *)(sfp)) For full uglyness, add an ifdef to test if uintptr_t exists (see the C99 standard), and backup methods for when it doesn't exist. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message