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: Somewhat-related changes to expr.c & tree.c


On 19 Nov 2000 22:12:19 -0800, per@bothner.com wrote:
  A representation I've thought made sense was to represent a range or
  index type using two values:

  * lower bound, type is that of index values.

  * size of range (number of elements), type is an unsigned sizetype.

This is close but we still would not have enough information to tell 
an array spanning the entire memory apart from one with zero length.
Also, this would not allow Ada array limits like -3 .. -5. It seems
unavoidable to me that we need an extra bit in addition to two indices
or an index and a size.

If we're going to use an extra bit to mark an empty range, we could
use the most straightforward method of having a lowerbound and an
upperbound indexing the first and the last element of the array.

  -Geert



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