Chris Lattner wrote:

An alternative design, which would save a field, is just to keep the offset of a field, in bits, from the start of the structure.

Yes, that would also work. But, in many cases, you need the byte offset, so there's a time/space tradeoff. Also, because of GCC's internal representation of integers, you have to be careful that you have enough bits; for example, you need 72 bits to represent things in a 64-bit address space.

--
Mark Mitchell
CodeSourcery
[EMAIL PROTECTED]
(650) 331-3385 x713

Reply via email to