Somewhat-related changes to expr.c & tree.c

Geert Bosch bosch@gnat.com
Mon Nov 20 14:58:00 GMT 2000


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




More information about the Gcc mailing list