
Thread
1994.09.20 07:00 "Re: TIFF Bit Ordering Versus Fill Order", by Fredrik Lundh
However, a possible way to define host bit order would be to use the C bit-field struct operations.
Is this a compiler-implementation dependent approach?
ANSI C, Section 3.5.2.1:
"The order of allocation of bit-fields within a unit
(high-order to low-order or low-order to high-order) is
implementation-defined."
The spec also states that it "need not be possible to express the address of each individual bit of an object", and that shifting n bits to the left is the same as multiplying by 2 raised to the power n.
To sum that up, there is no such thing as a "host bit order" when hacking C (at least not with the same meaning as "host byte order").
For additional reading on bit and byte orders, see IEN 137.
/F