From owner-cvs-all Wed Jul 4 22:54:46 2001 Delivered-To: cvs-all@freebsd.org Received: from mass.dis.org (dhcp44-21.dis.org [216.240.44.21]) by hub.freebsd.org (Postfix) with ESMTP id 8641937B406; Wed, 4 Jul 2001 22:54:40 -0700 (PDT) (envelope-from msmith@mass.dis.org) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.4/8.11.3) with ESMTP id f6567Vx00615; Wed, 4 Jul 2001 23:07:42 -0700 (PDT) (envelope-from msmith@mass.dis.org) Message-Id: <200107050607.f6567Vx00615@mass.dis.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Jens Schweikhardt Cc: Joerg Wunsch , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys bio.h In-reply-to: Your message of "Wed, 04 Jul 2001 21:26:24 +0200." <20010704212624.A1812@schweikhardt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 04 Jul 2001 23:07:31 -0700 From: Mike Smith Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > On Tue, Jul 03, 2001 at 11:33:21PM +0200, Joerg Wunsch wrote: > # As Mike Smith wrote: > ... > # > > Also, using a void * would have complicated matters pretty much. It's > # > > invalid to abuse a void * as an int > # > > # > Er, no it's not. > # > > # > void *foo; > # > int bar; > # > > # > bar = (int)(uintptr_t)foo; > # > > # > foo = (void *)(uintptr_t)bar; > # > # I think that's wrong C. AFAIR, an arbitrary /pointer/ is allowed to > # be cast to a void *, and then cast back to just that arbitrary > > s/cast/assigned to/g void pointers exist to fill^Wopen a gap in the type > system. Casting pointers to and from void* is a silly thing to do > outside variable arg lists (and only done by the C++ infected where it > is rquired :-) Regardless, the above is both legal and desirable. uintptr_t is an arbitrary scalar type large enough to hold both an unsigned integer and a pointer on the platform. Most of the rest of the drivel you offer up is laughable, given that you're writing a floppy disk driver, for crying out loud. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message