[r6rs-discuss] thinko in spec of fxcopy-bit-field

From: William D Clinger <will>
Date: Thu, 27 Sep 2007 20:07:56 -0400

Aziz wrote:
> > Why, pray tell, must the third argument to fxcopy-bit-field
> > be less than (fixnum-width)?
>
> So that your code would still work when you do
> (declare unsafe non-r6rs full-speed-forward)
> and without the compiler coercing the value of
> the shift to some small value. This also forces
> implementors to implement these operations in a
> portable, predictable, reliable, and safe manner.

Since your declaration is already outside the bounds
of R6RS, implementations are permitted to respond to
it by transforming the semantics in arbitrary ways.
Hence the R6RS spec in no way forces implementors to
implement operations in a portable, predictable,
reliable, or safe manner in programs governed by
your declaration.

What you are trying to say, I think, is that excluding
the sign bit from bit fields assists portability and
predictability in R6RS programs that contain no such
declarations, but all bets are off when you do
(declare unsafe non-r6rs full-speed-forward).

Will
Received on Thu Sep 27 2007 - 20:07:56 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC