Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Jul 2001 00:53:34 -0700
From:      Mike Smith <msmith@freebsd.org>
To:        Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/sys bio.h 
Message-ID:  <200107050753.f657rYx01824@mass.dis.org>
In-Reply-To: Your message of "Thu, 05 Jul 2001 08:53:58 %2B0200." <20010705085358.J3398@uriah.heep.sax.de> 

next in thread | previous in thread | raw e-mail | index | archive | help
> As Mike Smith wrote:
> 
> > > # 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
> 
> > Regardless, the above is both legal and desirable.
> 
> It might be desirable (depends on your point of view -- from a bit
> saving POV, it is, from a portability POV, it ain't).  But we've
> clearly shown that it is illegal.  C does not guarantee what will
> happen.  And no, you don't get me to write code that is more
> unportable than it needs to be.  Thus, i'd rather use one of the four
> million spare values that is left in bio_cmd.

Actually, the use of uinptr_t is both legal and common.

As for portability; I can't imagine why you're worried, given that the 
device driver in question (the only one that needs this hack) is entirely 
unportable anyway.

-- 
... 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107050753.f657rYx01824>