This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: More on type sizes


    The PACKED_ARRAY_REF should be subsumed by the language-independent
    ARARY_REF, and the language-independent code should handle packed
    arrays properly.  ...  But even so, since the concept of a "packed
    array" is not language specific, there is no point in *removing* that
    concept from the language-independent code, even if the support is
    incomplete.

I agree.  I wasn't proposing *removing* it, just commenting that I
view the present situation as somewhat unfortunate, mostly as a way to
discourage it occuring aain.  I suspect we both agree on this.

    It gets a bit hairy when you have a dynamic bit index in a
    dynamically-sized bit array, and also want to check for out-of-range.
    Still, I agree the best solution is to open-code the indexing.

The issue of range changes is one that I see very differently from the
indexing itself.  Range checks almost always need to be done by the front
end since the failure of a range check is language-specific.  But range
checks can also often be deleted (consider a loop over the bounds of the
array, a common case), so the main issue for me is the indexing itself.

    An empty range is (for example) a string or array of length zero.

OK.

    We had to go through various contortions dealing with (say) a
    TYPE_MAX_VALUE of -1.  

I don't see why.

    It's been a while since I worked on this, so I'm rather rusty on the
    issues.  One problem I seem to remember is that we wanted:
      TREE_TYPE (TYPE_MIN_VALUE (T)) == T
      TREE_TYPE (TYPE_MAX_VALUE (T)) == T

I'd have expected

	TREE_TYPE (TYPE_MIN_VALUE (T)) to be TREE_TYPE (T)

in most cases.  Why do you want the former?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]