Size changes, round 1

Richard Kenner
Sun Feb 20 15:39:00 GMT 2000

    I think you're missing my point.  TYPE_SIZE is size-in-bits, and
    TYPE_SIZE_UNIT is size-in-bytes.  


    Each has a fixed precision, and it's the same, right?  

No!  That's the *whole point* and why, I think, you are having trouble
understand the issues I'm raising.

On 32-bit machines, the precision of TYPE_SIZE is 64 and

    So, if something takes a number of bits that is not divisible by 8,
    but bigger than the precision of TYPE_SIZE, that we're out of luck --

But that can't happen, since TYPE_SIZE is defined to have a precision
which is at least log2 (BITS_PER_UNIT) greater than TYPE_SIZE_UNIT!
See set_sizetype in stor-layout.

    I'll not say anything further about the actual representation we're
    using -- I don't think it's relevant to the main point I'm trying to
    make, which is about engineering robust software.

I'm usually the first person to argue for robustness, but I simply
disagree that merging these two different fields will increase
robustness: indeed I feel quite the contrary: it will make things much
harder to maintain because every new way of updating the sizes will
require a new function to be added and used just in one place.

More information about the Gcc-patches mailing list